Skip to content

Commit e665e29

Browse files
authored
fix: Add Name property to SAM Statemachine EventBridgeRule event (#3087)
1 parent 331c682 commit e665e29

File tree

4 files changed

+24
-3
lines changed

4 files changed

+24
-3
lines changed

samtranslator/internal/schema_source/aws_serverless_function.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ class MSKEvent(BaseModel):
417417
class MQEventProperties(BaseModel):
418418
BatchSize: Optional[PassThroughProp] = mqeventproperties("BatchSize")
419419
Broker: PassThroughProp = mqeventproperties("Broker")
420-
DynamicPolicyName: Optional[bool] # TODO: add docs
420+
DynamicPolicyName: Optional[bool] = mqeventproperties("DynamicPolicyName")
421421
Enabled: Optional[PassThroughProp] = mqeventproperties("Enabled")
422422
FilterCriteria: Optional[PassThroughProp] = mqeventproperties("FilterCriteria")
423423
MaximumBatchingWindowInSeconds: Optional[PassThroughProp] = mqeventproperties("MaximumBatchingWindowInSeconds")

samtranslator/internal/schema_source/aws_serverless_statemachine.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ class EventBridgeRuleEventProperties(BaseModel):
117117
Pattern: Optional[PassThroughProp] = eventbridgeruleeventproperties("Pattern")
118118
RetryPolicy: Optional[PassThroughProp] = eventbridgeruleeventproperties("RetryPolicy")
119119
Target: Optional[EventBridgeRuleTarget] = eventbridgeruleeventproperties("Target")
120+
Name: Optional[PassThroughProp] = eventbridgeruleeventproperties("Name")
120121

121122

122123
class EventBridgeRuleEvent(BaseModel):

samtranslator/schema/schema.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197692,7 +197692,8 @@
197692197692
"title": "Broker"
197693197693
},
197694197694
"DynamicPolicyName": {
197695-
"title": "Dynamicpolicyname",
197695+
"markdownDescription": "By default, the AWS Identity and Access Management \\(IAM\\) policy name is `SamAutoGeneratedAMQPolicy` for backward compatibility\\. Specify `true` to use an auto\\-generated name for your IAM policy\\. This name will include the Amazon MQ event source logical ID\\. \nWhen using more than one Amazon MQ event source, specify `true` to avoid duplicate IAM policy names\\.\n*Type*: Boolean \n*Required*: No \n*Default*: `false` \n*AWS CloudFormation compatibility*: This property is unique to AWS SAM and doesn't have an AWS CloudFormation equivalent\\.",
197696+
"title": "DynamicPolicyName",
197696197697
"type": "boolean"
197697197698
},
197698197699
"Enabled": {
@@ -202008,6 +202009,15 @@
202008202009
"markdownDescription": "When you don't want to pass the entire matched event to the target, use the `InputPath` property to describe which part of the event to pass\\. \n*Type*: String \n*Required*: No \n*AWS CloudFormation compatibility*: This property is passed directly to the [`InputPath`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-inputpath) property of an `AWS::Events::Rule Target` resource\\.",
202009202010
"title": "InputPath"
202010202011
},
202012+
"Name": {
202013+
"allOf": [
202014+
{
202015+
"$ref": "#/definitions/PassThroughProp"
202016+
}
202017+
],
202018+
"markdownDescription": "The name of the rule\\. \n*Type*: String \n*Required*: No \n*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\\.",
202019+
"title": "Name"
202020+
},
202011202021
"Pattern": {
202012202022
"allOf": [
202013202023
{

schema_source/sam.schema.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1940,7 +1940,8 @@
19401940
"title": "Broker"
19411941
},
19421942
"DynamicPolicyName": {
1943-
"title": "Dynamicpolicyname",
1943+
"markdownDescription": "By default, the AWS Identity and Access Management \\(IAM\\) policy name is `SamAutoGeneratedAMQPolicy` for backward compatibility\\. Specify `true` to use an auto\\-generated name for your IAM policy\\. This name will include the Amazon MQ event source logical ID\\. \nWhen using more than one Amazon MQ event source, specify `true` to avoid duplicate IAM policy names\\.\n*Type*: Boolean \n*Required*: No \n*Default*: `false` \n*AWS CloudFormation compatibility*: This property is unique to AWS SAM and doesn't have an AWS CloudFormation equivalent\\.",
1944+
"title": "DynamicPolicyName",
19441945
"type": "boolean"
19451946
},
19461947
"Enabled": {
@@ -7029,6 +7030,15 @@
70297030
"markdownDescription": "When you don't want to pass the entire matched event to the target, use the `InputPath` property to describe which part of the event to pass\\. \n*Type*: String \n*Required*: No \n*AWS CloudFormation compatibility*: This property is passed directly to the [`InputPath`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-inputpath) property of an `AWS::Events::Rule Target` resource\\.",
70307031
"title": "InputPath"
70317032
},
7033+
"Name": {
7034+
"allOf": [
7035+
{
7036+
"$ref": "#/definitions/PassThroughProp"
7037+
}
7038+
],
7039+
"markdownDescription": "The name of the rule\\. \n*Type*: String \n*Required*: No \n*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\\.",
7040+
"title": "Name"
7041+
},
70327042
"Pattern": {
70337043
"allOf": [
70347044
{

0 commit comments

Comments
 (0)