Skip to content

Commit 5e11259

Browse files
committed
Added EventBridgePutEventsPolicy
1 parent f8e0505 commit 5e11259

File tree

6 files changed

+89
-0
lines changed

6 files changed

+89
-0
lines changed

examples/2016-10-31/policy_templates/all_policy_templates.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,6 @@ Resources:
107107
- TextractDetectAnalyzePolicy: {}
108108

109109
- TextractGetResultPolicy: {}
110+
111+
- EventBridgePutEventsPolicy:
112+
EventBusName: name

samtranslator/policy_templates_data/policy_templates.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1904,6 +1904,32 @@
19041904
}
19051905
]
19061906
}
1907+
},
1908+
"EventBridgePutEventsPolicy": {
1909+
"Description": "Gives permissions to send events to EventBridge",
1910+
"Parameters": {
1911+
"EventBusName": {
1912+
"Description": "Name of the EventBridge EventBus"
1913+
}
1914+
},
1915+
"Definition": {
1916+
"Statement": [
1917+
{
1918+
"Effect": "Allow",
1919+
"Action": "events:PutEvents",
1920+
"Resource": {
1921+
"Fn::Sub": [
1922+
"arn:${AWS::Partition}:events:${AWS::Region}:${AWS::AccountId}:event-bus/${eventBusName}",
1923+
{
1924+
"eventBusName": {
1925+
"Ref": "EventBusName"
1926+
}
1927+
}
1928+
]
1929+
}
1930+
}
1931+
]
1932+
}
19071933
}
19081934
}
19091935
}

tests/translator/input/all_policy_templates.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,3 +159,6 @@ Resources:
159159

160160
- AthenaQueryPolicy:
161161
WorkGroupName: name
162+
163+
- EventBridgePutEventsPolicy:
164+
EventBusName: name

tests/translator/output/all_policy_templates.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1485,6 +1485,25 @@
14851485
}
14861486
]
14871487
}
1488+
},
1489+
{
1490+
"PolicyName": "KitchenSinkFunctionRolePolicy55",
1491+
"PolicyDocument": {
1492+
"Statement": [
1493+
{
1494+
"Action": "events:PutEvents",
1495+
"Resource": {
1496+
"Fn::Sub": [
1497+
"arn:${AWS::Partition}:events:${AWS::Region}:${AWS::AccountId}:event-bus/${eventBusName}",
1498+
{
1499+
"eventBusName": "name"
1500+
}
1501+
]
1502+
},
1503+
"Effect": "Allow"
1504+
}
1505+
]
1506+
}
14881507
}
14891508
],
14901509
"Tags": [

tests/translator/output/aws-cn/all_policy_templates.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1485,6 +1485,25 @@
14851485
}
14861486
]
14871487
}
1488+
},
1489+
{
1490+
"PolicyName": "KitchenSinkFunctionRolePolicy55",
1491+
"PolicyDocument": {
1492+
"Statement": [
1493+
{
1494+
"Action": "events:PutEvents",
1495+
"Resource": {
1496+
"Fn::Sub": [
1497+
"arn:${AWS::Partition}:events:${AWS::Region}:${AWS::AccountId}:event-bus/${eventBusName}",
1498+
{
1499+
"eventBusName": "name"
1500+
}
1501+
]
1502+
},
1503+
"Effect": "Allow"
1504+
}
1505+
]
1506+
}
14881507
}
14891508
],
14901509
"Tags": [

tests/translator/output/aws-us-gov/all_policy_templates.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1485,6 +1485,25 @@
14851485
}
14861486
]
14871487
}
1488+
},
1489+
{
1490+
"PolicyName": "KitchenSinkFunctionRolePolicy55",
1491+
"PolicyDocument": {
1492+
"Statement": [
1493+
{
1494+
"Action": "events:PutEvents",
1495+
"Resource": {
1496+
"Fn::Sub": [
1497+
"arn:${AWS::Partition}:events:${AWS::Region}:${AWS::AccountId}:event-bus/${eventBusName}",
1498+
{
1499+
"eventBusName": "name"
1500+
}
1501+
]
1502+
},
1503+
"Effect": "Allow"
1504+
}
1505+
]
1506+
}
14881507
}
14891508
],
14901509
"Tags": [

0 commit comments

Comments
 (0)