aws::cloudwatch-event-rule¶
Create a CloudWatch rule and its targets.
Example¶
aws::cloudwatch-event-rule event-pattern-example
name: "event-pattern-test"
description: "first rule test"
event-pattern-path: 'event-pattern.json'
schedule-event: true
schedule-expression: 'rate(5 minutes)'
state: "ENABLED"
target
target-id: "event-pattern-match-target1"
target-arn: "arn:aws:sqs:us-east-2:242040583208:cloudwatch-test.fifo"
message-group-id: "test123"
end
end
Attributes¶
Attribute | Description |
---|---|
name | The name of the rule associated that matches incoming events. (Required) |
description | The description of the rule associated with the event. |
role | The IAM role that gives permissions to invoke actions on the targets. |
event-pattern | The event pattern which activates target actions when matched. |
schedule-expression | The schedule expression that triggers an automated rule action. See AWS Services Schedule Expressions. |
state | This value indicates if the rule is enabled to invoke target actions. Valid values are ENABLED or DISABLED Valid values are ENABLED or DISABLED . |
target set subresource | The list of target resources which can be invoked when an event pattern is matched or scheduled.
|
Outputs¶
Attribute | Description |
---|---|
managed-by | If role arn is given, this field specifies which aws service can manage the rules. |
arn | The arn for the cloudwatch rule. |