Skip to content

Commit

Permalink
Add FilterLogEvents policy to policy template.
Browse files Browse the repository at this point in the history
This commit essentially copies the pattern of commit #408
to add a policy template that permits calling the
filter log events cloudwatch API.
  • Loading branch information
Joshua Basden committed Jul 25, 2018
1 parent e8f74f5 commit 3981cd7
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 4 deletions.
17 changes: 17 additions & 0 deletions docs/policy_templates_data/policy_templates.json
Original file line number Diff line number Diff line change
Expand Up @@ -1239,6 +1239,23 @@
}
]
}
},
"FilterLogEventsPolicy": {
"Description": "Gives permission to filter Log Events from any Log Group",
"Parameters": {

},
"Definition": {
"Statement": [
{
"Effect": "Allow",
"Action": [
"logs:FilterLogEvents"
],
"Resource": "*"
}
]
}
}
}
}
17 changes: 17 additions & 0 deletions samtranslator/policy_templates_data/policy_templates.json
Original file line number Diff line number Diff line change
Expand Up @@ -1264,6 +1264,23 @@
}
]
}
},
"FilterLogEventsPolicy": {
"Description": "Gives permission to filter Log Events from any Log Group",
"Parameters": {

},
"Definition": {
"Statement": [
{
"Effect": "Allow",
"Action": [
"logs:FilterLogEvents"
],
"Resource": "*"
}
]
}
}
}
}
4 changes: 3 additions & 1 deletion tests/translator/input/all_policy_templates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,6 @@ Resources:
- MobileAnalyticsWriteOnlyAccessPolicy: {}

- PinpointEndpointAccessPolicy:
PinpointApplicationId: id
PinpointApplicationId: id

- FilterLogEventsPolicy: {}
16 changes: 15 additions & 1 deletion tests/translator/output/all_policy_templates.json
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,20 @@
}
]
}
},
{
"PolicyName": "KitchenSinkFunctionRolePolicy39",
"PolicyDocument": {
"Statement": [
{
"Action": [
"logs:FilterLogEvents"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
}
],
"AssumeRolePolicyDocument": {
Expand All @@ -1008,4 +1022,4 @@
}
}
}
}
}
16 changes: 15 additions & 1 deletion tests/translator/output/aws-cn/all_policy_templates.json
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,20 @@
}
]
}
},
{
"PolicyName": "KitchenSinkFunctionRolePolicy39",
"PolicyDocument": {
"Statement": [
{
"Action": [
"logs:FilterLogEvents"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
}
],
"AssumeRolePolicyDocument": {
Expand All @@ -1008,4 +1022,4 @@
}
}
}
}
}
16 changes: 15 additions & 1 deletion tests/translator/output/aws-us-gov/all_policy_templates.json
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,20 @@
}
]
}
},
{
"PolicyName": "KitchenSinkFunctionRolePolicy39",
"PolicyDocument": {
"Statement": [
{
"Action": [
"logs:FilterLogEvents"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
}
],
"AssumeRolePolicyDocument": {
Expand All @@ -1009,4 +1023,4 @@
}
}
}
}
}

0 comments on commit 3981cd7

Please sign in to comment.