Skip to content

Commit 46f9b2f

Browse files
authored
Merge pull request #1946 from udondan/iam-updates
2 parents 6074071 + 04e6fc7 commit 46f9b2f

File tree

13 files changed

+126
-9
lines changed

13 files changed

+126
-9
lines changed

CHANGELOG/v0.758.0.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
**New actions:**
2+
3+
- cognito-idp:AddUserPoolClientSecret
4+
- cognito-idp:DeleteUserPoolClientSecret
5+
- cognito-idp:ListUserPoolClientSecrets
6+
- es:RollbackElasticsearchServiceSoftwareUpdate
7+
- es:RollbackServiceSoftwareUpdate
8+
- ram:ListSourceAssociations
9+
10+
**New condition keys:**
11+
12+
- ram:RetainSharingOnAccountLeaveOrganization

README.md

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

1818
- 444 Services
19-
- 20408 Actions
19+
- 20414 Actions
2020
- 2165 Resource Types
21-
- 2282 Condition keys
21+
- 2283 Condition keys
2222
<!-- /stats -->
2323

2424
![EXPERIMENTAL](https://img.shields.io/badge/stability-experimantal-orange?style=for-the-badge)**<br>This is an early version of the package. The API will change while I implement new features. Therefore make sure you use an exact version in your `package.json` before it reaches 1.0.0.**

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.757.0
1+
0.758.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.757.0'
27+
release = '0.758.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,9 +31,9 @@ AWS IAM policy statement generator with fluent interface.
3131
Support for:
3232

3333
- 444 Services
34-
- 20408 Actions
34+
- 20414 Actions
3535
- 2165 Resource Types
36-
- 2282 Condition keys
36+
- 2283 Condition keys
3737

3838
..
3939
/stats

lib/generated/policy-statements/chime.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4010,13 +4010,14 @@ export class Chime extends PolicyStatement {
40104010
*
40114011
* @param meetingId - Identifier for the meetingId.
40124012
* @param accountId - Account of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's account.
4013+
* @param region - Region of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's region.
40134014
* @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.
40144015
*
40154016
* Possible conditions:
40164017
* - .ifAwsResourceTag()
40174018
*/
4018-
public onMeeting(meetingId: string, accountId?: string, partition?: string) {
4019-
return this.on(`arn:${ partition ?? this.defaultPartition }:chime::${ accountId ?? this.defaultAccount }:meeting/${ meetingId }`);
4019+
public onMeeting(meetingId: string, accountId?: string, region?: string, partition?: string) {
4020+
return this.on(`arn:${ partition ?? this.defaultPartition }:chime:${ region ?? this.defaultRegion }:${ accountId ?? this.defaultAccount }:meeting/${ meetingId }`);
40204021
}
40214022

40224023
/**

lib/generated/policy-statements/cognitouserpools.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,17 @@ export class CognitoIdp extends PolicyStatement {
2929
return this.to('AddCustomAttributes');
3030
}
3131

32+
/**
33+
* Grants permission to add a new secret to a confidential client
34+
*
35+
* Access Level: Write
36+
*
37+
* https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AddUserPoolClientSecret.html
38+
*/
39+
public toAddUserPoolClientSecret() {
40+
return this.to('AddUserPoolClientSecret');
41+
}
42+
3243
/**
3344
* Grants permission to add any user to any group
3445
*
@@ -582,6 +593,17 @@ export class CognitoIdp extends PolicyStatement {
582593
return this.to('DeleteUserPoolClient');
583594
}
584595

596+
/**
597+
* Grants permission to delete a secret from a list of secrets associated with a client
598+
*
599+
* Access Level: Write
600+
*
601+
* https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DeleteUserPoolClientSecret.html
602+
*/
603+
public toDeleteUserPoolClientSecret() {
604+
return this.to('DeleteUserPoolClientSecret');
605+
}
606+
585607
/**
586608
* Grants permission to delete any user pool domain
587609
*
@@ -972,6 +994,17 @@ export class CognitoIdp extends PolicyStatement {
972994
return this.to('ListUserImportJobs');
973995
}
974996

997+
/**
998+
* Grants permission to list all secrets associated with a client
999+
*
1000+
* Access Level: List
1001+
*
1002+
* https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ListUserPoolClientSecrets.html
1003+
*/
1004+
public toListUserPoolClientSecrets() {
1005+
return this.to('ListUserPoolClientSecrets');
1006+
}
1007+
9751008
/**
9761009
* Grants permission to list all app clients in user pools
9771010
*
@@ -1327,6 +1360,7 @@ export class CognitoIdp extends PolicyStatement {
13271360
protected accessLevelList: AccessLevelList = {
13281361
Write: [
13291362
'AddCustomAttributes',
1363+
'AddUserPoolClientSecret',
13301364
'AdminAddUserToGroup',
13311365
'AdminConfirmSignUp',
13321366
'AdminCreateUser',
@@ -1372,6 +1406,7 @@ export class CognitoIdp extends PolicyStatement {
13721406
'DeleteUserAttributes',
13731407
'DeleteUserPool',
13741408
'DeleteUserPoolClient',
1409+
'DeleteUserPoolClientSecret',
13751410
'DeleteUserPoolDomain',
13761411
'DisassociateWebACL',
13771412
'ForgetDevice',
@@ -1442,6 +1477,7 @@ export class CognitoIdp extends PolicyStatement {
14421477
'ListTagsForResource',
14431478
'ListTerms',
14441479
'ListUserImportJobs',
1480+
'ListUserPoolClientSecrets',
14451481
'ListUserPoolClients',
14461482
'ListUserPools',
14471483
'ListUsers',

lib/generated/policy-statements/opensearchservice.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,6 +1130,28 @@ export class Es extends PolicyStatement {
11301130
return this.to('RevokeVpcEndpointAccess');
11311131
}
11321132

1133+
/**
1134+
* Grants permission to rollback a service software update of an elasticsearch domain to its previous version
1135+
*
1136+
* Access Level: Write
1137+
*
1138+
* https://docs.aws.amazon.com/opensearch-service/latest/APIReference/API_RollbackServiceSoftwareUpdate.html
1139+
*/
1140+
public toRollbackElasticsearchServiceSoftwareUpdate() {
1141+
return this.to('RollbackElasticsearchServiceSoftwareUpdate');
1142+
}
1143+
1144+
/**
1145+
* Grants permission to rollback a service software update of an opensearch domain to its previous version
1146+
*
1147+
* Access Level: Write
1148+
*
1149+
* https://docs.aws.amazon.com/opensearch-service/latest/APIReference/API_RollbackServiceSoftwareUpdate.html
1150+
*/
1151+
public toRollbackServiceSoftwareUpdate() {
1152+
return this.to('RollbackServiceSoftwareUpdate');
1153+
}
1154+
11331155
/**
11341156
* Grants permission to initiate the maintenance on the node
11351157
*
@@ -1341,6 +1363,8 @@ export class Es extends PolicyStatement {
13411363
'RejectInboundConnection',
13421364
'RejectInboundCrossClusterSearchConnection',
13431365
'RevokeVpcEndpointAccess',
1366+
'RollbackElasticsearchServiceSoftwareUpdate',
1367+
'RollbackServiceSoftwareUpdate',
13441368
'StartDomainMaintenance',
13451369
'StartElasticsearchServiceSoftwareUpdate',
13461370
'StartServiceSoftwareUpdate',

lib/generated/policy-statements/resourceaccessmanagerram.ts

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export class Ram extends PolicyStatement {
4646
* - .ifPrincipal()
4747
* - .ifRequestedResourceType()
4848
* - .ifResourceArn()
49+
* - .ifRetainSharingOnAccountLeaveOrganization()
4950
*
5051
* https://docs.aws.amazon.com/ram/latest/APIReference/API_AssociateResourceShare.html
5152
*/
@@ -113,6 +114,7 @@ export class Ram extends PolicyStatement {
113114
* - .ifRequestedAllowsExternalPrincipals()
114115
* - .ifPrincipal()
115116
* - .ifAllowsExternalPrincipals()
117+
* - .ifRetainSharingOnAccountLeaveOrganization()
116118
*
117119
* https://docs.aws.amazon.com/ram/latest/APIReference/API_CreateResourceShare.html
118120
*/
@@ -161,6 +163,7 @@ export class Ram extends PolicyStatement {
161163
* - .ifResourceTag()
162164
* - .ifResourceShareName()
163165
* - .ifAllowsExternalPrincipals()
166+
* - .ifRetainSharingOnAccountLeaveOrganization()
164167
*
165168
* https://docs.aws.amazon.com/ram/latest/APIReference/API_DeleteResourceShare.html
166169
*/
@@ -181,6 +184,7 @@ export class Ram extends PolicyStatement {
181184
* - .ifPrincipal()
182185
* - .ifRequestedResourceType()
183186
* - .ifResourceArn()
187+
* - .ifRetainSharingOnAccountLeaveOrganization()
184188
*
185189
* https://docs.aws.amazon.com/ram/latest/APIReference/API_DisassociateResourceShare.html
186190
*/
@@ -359,6 +363,7 @@ export class Ram extends PolicyStatement {
359363
* - .ifAwsResourceTag()
360364
* - .ifResourceShareName()
361365
* - .ifAllowsExternalPrincipals()
366+
* - .ifRetainSharingOnAccountLeaveOrganization()
362367
*
363368
* https://docs.aws.amazon.com/ram/latest/APIReference/API_ListResourceSharePermissions.html
364369
*/
@@ -388,6 +393,17 @@ export class Ram extends PolicyStatement {
388393
return this.to('ListResources');
389394
}
390395

396+
/**
397+
* Grants permission to list source associations for resource shares
398+
*
399+
* Access Level: List
400+
*
401+
* https://docs.aws.amazon.com/ram/latest/APIReference/API_ListSourceAssociations.html
402+
*/
403+
public toListSourceAssociations() {
404+
return this.to('ListSourceAssociations');
405+
}
406+
391407
/**
392408
* Grants permission to create a separate, fully manageable customer managed permission
393409
*
@@ -499,6 +515,7 @@ export class Ram extends PolicyStatement {
499515
* - .ifResourceShareName()
500516
* - .ifAllowsExternalPrincipals()
501517
* - .ifRequestedAllowsExternalPrincipals()
518+
* - .ifRetainSharingOnAccountLeaveOrganization()
502519
*
503520
* https://docs.aws.amazon.com/ram/latest/APIReference/API_UpdateResourceShare.html
504521
*/
@@ -545,7 +562,8 @@ export class Ram extends PolicyStatement {
545562
'ListReplacePermissionAssociationsWork',
546563
'ListResourceSharePermissions',
547564
'ListResourceTypes',
548-
'ListResources'
565+
'ListResources',
566+
'ListSourceAssociations'
549567
],
550568
Tagging: [
551569
'TagResource',
@@ -874,6 +892,25 @@ export class Ram extends PolicyStatement {
874892
return this.if(`ResourceTag/${ tagKey }`, value, operator ?? 'StringLike');
875893
}
876894

895+
/**
896+
* Filters access by RetainSharingOnAccountLeaveOrganization value within ResourceShareConfiguration that is set on resource share
897+
*
898+
* https://docs.aws.amazon.com/ram/latest/userguide/iam-policies.html#iam-policies-condition
899+
*
900+
* Applies to actions:
901+
* - .toAssociateResourceShare()
902+
* - .toCreateResourceShare()
903+
* - .toDeleteResourceShare()
904+
* - .toDisassociateResourceShare()
905+
* - .toListResourceSharePermissions()
906+
* - .toUpdateResourceShare()
907+
*
908+
* @param value `true` or `false`. **Default:** `true`
909+
*/
910+
public ifRetainSharingOnAccountLeaveOrganization(value?: boolean) {
911+
return this.if(`RetainSharingOnAccountLeaveOrganization`, (typeof value !== 'undefined' ? value : true), 'Bool');
912+
}
913+
877914
/**
878915
* Filters access by resource shares owned by a specific account. For example, you can use this condition key to specify which resource share invitations can be accepted or rejected based on the resource share owner's account ID
879916
*

stats/actions/cognito-idp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
cognito-idp:AddCustomAttributes;Write
2+
cognito-idp:AddUserPoolClientSecret;Write
23
cognito-idp:AdminAddUserToGroup;Write
34
cognito-idp:AdminConfirmSignUp;Write
45
cognito-idp:AdminCreateUser;Write
@@ -49,6 +50,7 @@ cognito-idp:DeleteUser;Write
4950
cognito-idp:DeleteUserAttributes;Write
5051
cognito-idp:DeleteUserPool;Write
5152
cognito-idp:DeleteUserPoolClient;Write
53+
cognito-idp:DeleteUserPoolClientSecret;Write
5254
cognito-idp:DeleteUserPoolDomain;Write
5355
cognito-idp:DescribeIdentityProvider;Read
5456
cognito-idp:DescribeManagedLoginBranding;Read
@@ -85,6 +87,7 @@ cognito-idp:ListResourcesForWebACL;List
8587
cognito-idp:ListTagsForResource;List
8688
cognito-idp:ListTerms;List
8789
cognito-idp:ListUserImportJobs;List
90+
cognito-idp:ListUserPoolClientSecrets;List
8891
cognito-idp:ListUserPoolClients;List
8992
cognito-idp:ListUserPools;List
9093
cognito-idp:ListUsers;List

0 commit comments

Comments
 (0)