Skip to content

Commit 6e3cfb2

Browse files
authored
Merge pull request #1912 from udondan/iam-updates
2 parents dee8fa7 + 03e6d39 commit 6e3cfb2

File tree

16 files changed

+209
-26
lines changed

16 files changed

+209
-26
lines changed

CHANGELOG/v0.754.0.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
:warning: **Removed resource types:**
2+
3+
- elemental-inference:FeedResource
4+
5+
**New actions:**
6+
7+
- cloudwatch:DeleteAlarmMuteRule
8+
- cloudwatch:GetAlarmMuteRule
9+
- cloudwatch:ListAlarmMuteRules
10+
- cloudwatch:PutAlarmMuteRule
11+
- lex:DeleteBotAnalyzerRecommendation
12+
- lex:DescribeBotAnalyzerRecommendation
13+
- lex:ListBotAnalyzerRecommendations
14+
- lex:StartBotAnalyzer
15+
- lex:StopBotAnalyzer
16+
- wafv2:GetTopPathStatisticsByTraffic
17+
18+
**Updated action access level:**
19+
20+
- elemental-inference:GetMetadata: Write -> Read
21+
22+
**New resource types:**
23+
24+
- cloudwatch:alarm-mute-rule
25+
- elemental-inference:feed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
Support for:
1717

1818
- 443 Services
19-
- 20326 Actions
20-
- 2154 Resource Types
19+
- 20336 Actions
20+
- 2155 Resource Types
2121
- 2276 Condition keys
2222
<!-- /stats -->
2323

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.753.0
1+
0.754.0

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
author = 'Daniel Schroeder'
2525

2626
# The full version, including alpha/beta/rc tags
27-
release = '0.753.0'
27+
release = '0.754.0'
2828

2929
# -- General configuration ---------------------------------------------------
3030

docs/source/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ AWS IAM policy statement generator with fluent interface.
3131
Support for:
3232

3333
- 443 Services
34-
- 20326 Actions
35-
- 2154 Resource Types
34+
- 20336 Actions
35+
- 2155 Resource Types
3636
- 2276 Condition keys
3737

3838
..

lib/generated/policy-statements/cloudwatch.ts

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,17 @@ export class Cloudwatch extends PolicyStatement {
5555
return this.to('CreateServiceLevelObjective');
5656
}
5757

58+
/**
59+
* Grants permission to delete an alarm mute rule
60+
*
61+
* Access Level: Write
62+
*
63+
* https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DeleteAlarmMuteRule.html
64+
*/
65+
public toDeleteAlarmMuteRule() {
66+
return this.to('DeleteAlarmMuteRule');
67+
}
68+
5869
/**
5970
* Grants permission to delete a collection of alarms
6071
*
@@ -253,6 +264,17 @@ export class Cloudwatch extends PolicyStatement {
253264
return this.to('GenerateQueryResultsSummary');
254265
}
255266

267+
/**
268+
* Grants permission to get an alarm mute rule
269+
*
270+
* Access Level: Read
271+
*
272+
* https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetAlarmMuteRule.html
273+
*/
274+
public toGetAlarmMuteRule() {
275+
return this.to('GetAlarmMuteRule');
276+
}
277+
256278
/**
257279
* Grants permission to display the details of the CloudWatch dashboard you specify
258280
*
@@ -385,6 +407,17 @@ export class Cloudwatch extends PolicyStatement {
385407
return this.to('Link');
386408
}
387409

410+
/**
411+
* Grants permission to retrieve a list of alarm mute rules owned by the user's account
412+
*
413+
* Access Level: List
414+
*
415+
* https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_ListAlarmMuteRules.html
416+
*/
417+
public toListAlarmMuteRules() {
418+
return this.to('ListAlarmMuteRules');
419+
}
420+
388421
/**
389422
* Grants permission to return a list of all CloudWatch dashboards in your account
390423
*
@@ -478,6 +511,21 @@ export class Cloudwatch extends PolicyStatement {
478511
return this.to('ListTagsForResource');
479512
}
480513

514+
/**
515+
* Grants permission to create or update an alarm mute rule
516+
*
517+
* Access Level: Write
518+
*
519+
* Possible conditions:
520+
* - .ifAwsRequestTag()
521+
* - .ifAwsTagKeys()
522+
*
523+
* https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutAlarmMuteRule.html
524+
*/
525+
public toPutAlarmMuteRule() {
526+
return this.to('PutAlarmMuteRule');
527+
}
528+
481529
/**
482530
* Grants permission to create or update an anomaly detection model for a CloudWatch metric
483531
*
@@ -677,6 +725,7 @@ export class Cloudwatch extends PolicyStatement {
677725
'DescribeInsightRules',
678726
'GenerateQuery',
679727
'GenerateQueryResultsSummary',
728+
'GetAlarmMuteRule',
680729
'GetDashboard',
681730
'GetInsightRuleReport',
682731
'GetMetricData',
@@ -692,6 +741,7 @@ export class Cloudwatch extends PolicyStatement {
692741
],
693742
Write: [
694743
'CreateServiceLevelObjective',
744+
'DeleteAlarmMuteRule',
695745
'DeleteAlarms',
696746
'DeleteAnomalyDetector',
697747
'DeleteDashboards',
@@ -704,6 +754,7 @@ export class Cloudwatch extends PolicyStatement {
704754
'EnableInsightRules',
705755
'EnableTopologyDiscovery',
706756
'Link',
757+
'PutAlarmMuteRule',
707758
'PutAnomalyDetector',
708759
'PutCompositeAlarm',
709760
'PutDashboard',
@@ -718,6 +769,7 @@ export class Cloudwatch extends PolicyStatement {
718769
'UpdateServiceLevelObjective'
719770
],
720771
List: [
772+
'ListAlarmMuteRules',
721773
'ListDashboards',
722774
'ListEntitiesForMetric',
723775
'ListMetricStreams',
@@ -749,6 +801,23 @@ export class Cloudwatch extends PolicyStatement {
749801
return this.on(`arn:${ partition ?? this.defaultPartition }:cloudwatch:${ region ?? this.defaultRegion }:${ account ?? this.defaultAccount }:alarm:${ alarmName }`);
750802
}
751803

804+
/**
805+
* Adds a resource of type alarm-mute-rule to the statement
806+
*
807+
* https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/auth-and-access-control-cw.html
808+
*
809+
* @param alarmMuteRuleName - Identifier for the alarmMuteRuleName.
810+
* @param account - Account of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's account.
811+
* @param region - Region of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's region.
812+
* @param partition - Partition of the AWS account [aws, aws-cn, aws-us-gov]; defaults to `aws`, unless using the CDK, where the default is the current Stack's partition.
813+
*
814+
* Possible conditions:
815+
* - .ifAwsResourceTag()
816+
*/
817+
public onAlarmMuteRule(alarmMuteRuleName: string, account?: string, region?: string, partition?: string) {
818+
return this.on(`arn:${ partition ?? this.defaultPartition }:cloudwatch:${ region ?? this.defaultRegion }:${ account ?? this.defaultAccount }:alarm-mute-rule:${ alarmMuteRuleName }`);
819+
}
820+
752821
/**
753822
* Adds a resource of type dashboard to the statement
754823
*
@@ -839,6 +908,7 @@ export class Cloudwatch extends PolicyStatement {
839908
* Applies to actions:
840909
* - .toCreateServiceLevelObjective()
841910
* - .toListManagedInsightRules()
911+
* - .toPutAlarmMuteRule()
842912
* - .toPutCompositeAlarm()
843913
* - .toPutInsightRule()
844914
* - .toPutManagedInsightRules()
@@ -861,6 +931,7 @@ export class Cloudwatch extends PolicyStatement {
861931
*
862932
* Applies to resource types:
863933
* - alarm
934+
* - alarm-mute-rule
864935
* - insight-rule
865936
* - metric-stream
866937
* - slo
@@ -882,6 +953,7 @@ export class Cloudwatch extends PolicyStatement {
882953
* Applies to actions:
883954
* - .toCreateServiceLevelObjective()
884955
* - .toListManagedInsightRules()
956+
* - .toPutAlarmMuteRule()
885957
* - .toPutCompositeAlarm()
886958
* - .toPutInsightRule()
887959
* - .toPutManagedInsightRules()

lib/generated/policy-statements/elasticblockstore.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ export class Ebs extends PolicyStatement {
101101
* - .ifParentSnapshot()
102102
* - .ifVolumeSize()
103103
*
104+
* Dependent actions:
105+
* - ec2:CreateTags
106+
*
104107
* https://docs.aws.amazon.com/ebs/latest/APIReference/API_StartSnapshot.html
105108
*/
106109
public toStartSnapshot() {

lib/generated/policy-statements/elementalinference.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export class ElementalInference extends PolicyStatement {
2323
*
2424
* Access Level: Write
2525
*
26-
* https://docs.aws.amazon.com/elemental-inference/latest/api/API_AssociateFeed.html
26+
* https://docs.aws.amazon.com/elemental-inference/latest/APIReference/API_AssociateFeed.html
2727
*/
2828
public toAssociateFeed() {
2929
return this.to('AssociateFeed');
@@ -38,7 +38,7 @@ export class ElementalInference extends PolicyStatement {
3838
* - .ifAwsRequestTag()
3939
* - .ifAwsTagKeys()
4040
*
41-
* https://docs.aws.amazon.com/elemental-inference/latest/api/API_CreateFeed.html
41+
* https://docs.aws.amazon.com/elemental-inference/latest/APIReference/API_CreateFeed.html
4242
*/
4343
public toCreateFeed() {
4444
return this.to('CreateFeed');
@@ -49,7 +49,7 @@ export class ElementalInference extends PolicyStatement {
4949
*
5050
* Access Level: Write
5151
*
52-
* https://docs.aws.amazon.com/elemental-inference/latest/api/API_DeleteFeed.html
52+
* https://docs.aws.amazon.com/elemental-inference/latest/APIReference/API_DeleteFeed.html
5353
*/
5454
public toDeleteFeed() {
5555
return this.to('DeleteFeed');
@@ -60,7 +60,7 @@ export class ElementalInference extends PolicyStatement {
6060
*
6161
* Access Level: Write
6262
*
63-
* https://docs.aws.amazon.com/elemental-inference/latest/api/API_DisassociateFeed.html
63+
* https://docs.aws.amazon.com/elemental-inference/latest/APIReference/API_DisassociateFeed.html
6464
*/
6565
public toDisassociateFeed() {
6666
return this.to('DisassociateFeed');
@@ -71,7 +71,7 @@ export class ElementalInference extends PolicyStatement {
7171
*
7272
* Access Level: Read
7373
*
74-
* https://docs.aws.amazon.com/elemental-inference/latest/api/API_GetFeed.html
74+
* https://docs.aws.amazon.com/elemental-inference/latest/APIReference/API_GetFeed.html
7575
*/
7676
public toGetFeed() {
7777
return this.to('GetFeed');
@@ -80,9 +80,9 @@ export class ElementalInference extends PolicyStatement {
8080
/**
8181
* Grants permission to retrieve metadata for a specific feed output
8282
*
83-
* Access Level: Write
83+
* Access Level: Read
8484
*
85-
* https://docs.aws.amazon.com/elemental-inference/latest/api/API_GetMetadata.html
85+
* https://docs.aws.amazon.com/elemental-inference/latest/APIReference/API_GetMetadata.html
8686
*/
8787
public toGetMetadata() {
8888
return this.to('GetMetadata');
@@ -93,7 +93,7 @@ export class ElementalInference extends PolicyStatement {
9393
*
9494
* Access Level: List
9595
*
96-
* https://docs.aws.amazon.com/elemental-inference/latest/api/API_ListFeeds.html
96+
* https://docs.aws.amazon.com/elemental-inference/latest/APIReference/API_ListFeeds.html
9797
*/
9898
public toListFeeds() {
9999
return this.to('ListFeeds');
@@ -104,7 +104,7 @@ export class ElementalInference extends PolicyStatement {
104104
*
105105
* Access Level: Read
106106
*
107-
* https://docs.aws.amazon.com/elemental-inference/latest/api/API_ListTagsForResource.html
107+
* https://docs.aws.amazon.com/elemental-inference/latest/APIReference/API_ListTagsForResource.html
108108
*/
109109
public toListTagsForResource() {
110110
return this.to('ListTagsForResource');
@@ -115,7 +115,7 @@ export class ElementalInference extends PolicyStatement {
115115
*
116116
* Access Level: Write
117117
*
118-
* https://docs.aws.amazon.com/elemental-inference/latest/api/API_PutMedia.html
118+
* https://docs.aws.amazon.com/elemental-inference/latest/APIReference/API_PutMedia.html
119119
*/
120120
public toPutMedia() {
121121
return this.to('PutMedia');
@@ -130,7 +130,7 @@ export class ElementalInference extends PolicyStatement {
130130
* - .ifAwsRequestTag()
131131
* - .ifAwsTagKeys()
132132
*
133-
* https://docs.aws.amazon.com/elemental-inference/latest/api/API_TagResource.html
133+
* https://docs.aws.amazon.com/elemental-inference/latest/APIReference/API_TagResource.html
134134
*/
135135
public toTagResource() {
136136
return this.to('TagResource');
@@ -144,7 +144,7 @@ export class ElementalInference extends PolicyStatement {
144144
* Possible conditions:
145145
* - .ifAwsTagKeys()
146146
*
147-
* https://docs.aws.amazon.com/elemental-inference/latest/api/API_UntagResource.html
147+
* https://docs.aws.amazon.com/elemental-inference/latest/APIReference/API_UntagResource.html
148148
*/
149149
public toUntagResource() {
150150
return this.to('UntagResource');
@@ -155,7 +155,7 @@ export class ElementalInference extends PolicyStatement {
155155
*
156156
* Access Level: Write
157157
*
158-
* https://docs.aws.amazon.com/elemental-inference/latest/api/API_UpdateFeed.html
158+
* https://docs.aws.amazon.com/elemental-inference/latest/APIReference/API_UpdateFeed.html
159159
*/
160160
public toUpdateFeed() {
161161
return this.to('UpdateFeed');
@@ -167,12 +167,12 @@ export class ElementalInference extends PolicyStatement {
167167
'CreateFeed',
168168
'DeleteFeed',
169169
'DisassociateFeed',
170-
'GetMetadata',
171170
'PutMedia',
172171
'UpdateFeed'
173172
],
174173
Read: [
175174
'GetFeed',
175+
'GetMetadata',
176176
'ListTagsForResource'
177177
],
178178
List: [
@@ -185,9 +185,9 @@ export class ElementalInference extends PolicyStatement {
185185
};
186186

187187
/**
188-
* Adds a resource of type FeedResource to the statement
188+
* Adds a resource of type feed to the statement
189189
*
190-
* https://docs.aws.amazon.com/elemental-inference/latest/APIReference/API_Feed.html
190+
* https://docs.aws.amazon.com/elemental-inference/latest/userguide/elemental-inference-configuration.html
191191
*
192192
* @param id - Identifier for the id.
193193
* @param account - Account of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's account.
@@ -197,7 +197,7 @@ export class ElementalInference extends PolicyStatement {
197197
* Possible conditions:
198198
* - .ifAwsResourceTag()
199199
*/
200-
public onFeedResource(id: string, account?: string, region?: string, partition?: string) {
200+
public onFeed(id: string, account?: string, region?: string, partition?: string) {
201201
return this.on(`arn:${ partition ?? this.defaultPartition }:elemental-inference:${ region ?? this.defaultRegion }:${ account ?? this.defaultAccount }:feed/${ id }`);
202202
}
203203

@@ -224,7 +224,7 @@ export class ElementalInference extends PolicyStatement {
224224
* https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-resourcetag
225225
*
226226
* Applies to resource types:
227-
* - FeedResource
227+
* - feed
228228
*
229229
* @param tagKey The tag key to check
230230
* @param value The value(s) to check

0 commit comments

Comments
 (0)