Skip to content
This repository was archived by the owner on Jun 28, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions doc_source/sam-property-function-eventbridgerule.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ To declare this entity in your AWS Serverless Application Model \(AWS SAM\) temp
[InputPath](#sam-function-eventbridgerule-inputpath): String
[Pattern](#sam-function-eventbridgerule-pattern): [EventPattern](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-eventpattern)
[RetryPolicy](#sam-function-eventbridgerule-retrypolicy): [RetryPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-retrypolicy)
[RuleName](#sam-function-eventbridgerule-name): String
[State](#sam-function-eventbridgerule-state): String
[Target](#sam-function-eventbridgerule-target): Target
```

Expand Down Expand Up @@ -60,6 +62,19 @@ A `RetryPolicy` object that includes information about the retry policy settings
*Required*: No
*AWS CloudFormation compatibility*: This property is passed directly to the `[RetryPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-retrypolicy)` property of the `AWS::Events::Rule` `Target` data type\.

`RuleName` <a name="sam-function-eventbridgerule-rulename"></a>
The name of the rule\. If you omit this property, AWS SAM generates the name.
*Type*: String
*Required*: No
*AWS CloudFormation compatibility*: This property is passed directly to the `[Name](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-name)` property of an `AWS::Events::Rule` resource\.

`State` <a name="sam-function-eventbridgerule-state"></a>
The state of the rule\.
*Type*: String
*Required*: No
*Default*: `ENABLED`
*AWS CloudFormation compatibility*: This property is passed directly to the `[State](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-state)` property of an `AWS::Events::Rule` resource\.

`Target` <a name="sam-function-eventbridgerule-target"></a>
The AWS resource that EventBridge invokes when a rule is triggered\. You can use this property to specify the logical ID of the target\. If this property is not specified, then AWS SAM generates the logical ID of the target\.
*Type*: [Target](sam-property-function-target.md)
Expand All @@ -79,6 +94,7 @@ EBRule:
Type: EventBridgeRule
Properties:
Input: '{"Key": "Value"}'
RuleName: MyRule
Pattern:
detail:
state:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ To declare this entity in your AWS Serverless Application Model \(AWS SAM\) temp
[InputPath](#sam-statemachine-statemachineeventbridgerule-inputpath): String
[Pattern](#sam-statemachine-statemachineeventbridgerule-pattern): [EventPattern](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-eventpattern)
[RetryPolicy](#sam-statemachine-statemachineeventbridgerule-retrypolicy): [RetryPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-retrypolicy)
[RuleName](#sam-function-eventbridgerule-name): String
[State](#sam-function-eventbridgerule-state): String
```

## Properties<a name="sam-property-statemachine-statemachineeventbridgerule-properties"></a>
Expand Down Expand Up @@ -58,6 +60,19 @@ A `RetryPolicy` object that includes information about the retry policy settings
*Required*: No
*AWS CloudFormation compatibility*: This property is passed directly to the `[RetryPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-retrypolicy)` property of the `AWS::Events::Rule` `Target` data type\.

`RuleName` <a name="sam-function-eventbridgerule-rulename"></a>
The name of the rule\. If you omit this property, AWS SAM generates the name.
*Type*: String
*Required*: No
*AWS CloudFormation compatibility*: This property is passed directly to the `[Name](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-name)` property of an `AWS::Events::Rule` resource\.

`State` <a name="sam-function-eventbridgerule-state"></a>
The state of the rule\.
*Type*: String
*Required*: No
*Default*: `ENABLED`
*AWS CloudFormation compatibility*: This property is passed directly to the `[State](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-state)` property of an `AWS::Events::Rule` resource\.

## Examples<a name="sam-property-statemachine-statemachineeventbridgerule--examples"></a>

### EventBridgeRule<a name="sam-property-statemachine-statemachineeventbridgerule--examples--eventbridgerule"></a>
Expand All @@ -75,4 +90,5 @@ EBRule:
detail:
state:
- terminated
RuleName: MyRule
```