Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlarmDimension ¶
AlarmDimension describes a config setting for the trigger
type AlarmMessage ¶
type AlarmMessage struct { Subject string `json:"-"` AlarmName string `json:"AlarmName"` AlarmDescription string `json:"AlarmDescription"` AWSAccountID string `json:"AWSAccountId"` OldStateValue string `json:"OldStateValue"` NewStateValue string `json:"NewStateValue"` NewStateReason string `json:"NewStateReason"` StateChangeTime string `json:"StateChangeTime"` Region string `json:"Region"` Trigger AlarmTrigger `json:"Trigger"` }
AlarmMessage describes a CloudWatch Alarm SNS event
type AlarmTrigger ¶
type AlarmTrigger struct { MetricName string `json:"MetricName"` Namespace string `json:"Namespace"` Statistic string `json:"Statistic"` Unit string `json:"Unit"` Dimensions []AlarmDimension `json:"Dimensions"` Period int `json:"Period"` EvaluationPeriods int `json:"EvaluationPeriods"` ComparisonOperator string `json:"ComparisonOperator"` Threshold float32 `json:"Threshold"` }
AlarmTrigger describes the SNS Alarm trigger
type SNSEntity ¶
type SNSEntity struct { Signature string `json:"Signature"` MessageID string `json:"MessageId"` Type string `json:"Type"` TopicArn string `json:"TopicArn"` MessageAttributes map[string]interface{} `json:"MessageAttributes"` SignatureVersion string `json:"SignatureVersion"` Timestamp string `json:"Timestamp"` SigningCertURL string `json:"SigningCertUrl"` Message string `json:"Message"` UnsubscribeURL string `json:"UnsubscribeUrl"` Subject string `json:"Subject"` }
SNSEntity is the message details for the SNS event
type SNSEvent ¶
type SNSEvent struct {
Records []SNSEventRecord `json:"Records"`
}
SNSEvent is a set of EventRecords
type SNSEventRecord ¶
type SNSEventRecord struct { EventVersion string `json:"EventVersion"` EventSubscriptionArn string `json:"EventSubscriptionArn"` EventSource string `json:"EventSource"` SNS SNSEntity `json:"Sns"` }
SNSEventRecord is an SNS event
func (*SNSEventRecord) DecodedMessage ¶
func (r *SNSEventRecord) DecodedMessage() (AlarmMessage, error)
DecodedMessage decodes the message body of an SNS record
Click to show internal directories.
Click to hide internal directories.