Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleFunc ¶
func HandleFunc(h HandlerFunc)
HandleFunc handles CloudWatch Events with callback function.
Types ¶
type APIDetail ¶
type APIDetail struct {
EventID string `json:"eventID"`
EventName string `json:"eventName"`
EventSource string `json:"eventSource"`
EventTime time.Time `json:"eventTime"`
EventType string `json:"eventType"`
EventVersion string `json:"eventVersion"`
AWSRegion string `json:"awsRegion"`
AdditionalEventData map[string]string `json:"additionalEventData,omitempty"`
RequestParams interface{} `json:"requestParameters"`
ResponseElements map[string]string `json:"responseElements,omitempty"`
SourceIPAddress string `json:"sourceIPAddress"`
UserAgent string `json:"userAgent"`
UserIdentity UserIdentity `json:"userIdentity,omitempty"`
}
APIDetail of the triggered event This is useful for API or Console events
type AutoScalingGroupDetail ¶
type AutoScalingGroupDetail struct {
ActivityID string `json:"ActivityId"`
AutoScalingGroupName string `json:"AutoScalingGroupName"`
Cause string `json:"Cause"`
Details map[string]string `json:"Details"`
EC2InstanceID string `json:"EC2InstanceId"`
RequestID string `json:"RequestId"`
StatusCode string `json:"StatusCode"`
StartTime time.Time `json:"StartTime"`
EndTime time.Time `json:"EndTime"`
}
AutoScalingGroupDetail of the triggered event
type Event ¶
type Event struct {
ID string `json:"id"`
DetailType string `json:"detail-type"`
Source string `json:"source"`
Account string `json:"account"`
Time time.Time `json:"time"`
Region string `json:"region"`
Resources []string `json:"resources"`
Detail json.RawMessage `json:"detail"`
}
Event represents a CloudWatch Event
type HandlerFunc ¶
HandlerFunc unmarshals CloudWatch Events before passing control.
func (HandlerFunc) Handle ¶
func (h HandlerFunc) Handle(data json.RawMessage, ctx *apex.Context) (interface{}, error)
Handle implements apex.Handler.
Click to show internal directories.
Click to hide internal directories.