Skip to content

Commit 0db773c

Browse files
authored
Merge pull request #1864 from udondan/iam-updates
2 parents 38d66f6 + 49ff0a6 commit 0db773c

File tree

12 files changed

+209
-10
lines changed

12 files changed

+209
-10
lines changed

CHANGELOG/v0.746.0.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
**New actions:**
2+
3+
- bedrock-agentcore:CreateBrowserProfile
4+
- bedrock-agentcore:DeleteBrowserProfile
5+
- bedrock-agentcore:GetBrowserProfile
6+
- bedrock-agentcore:ListBrowserProfiles
7+
- bedrock-agentcore:SaveBrowserSessionProfile
8+
- glue:DeleteConnectionType
9+
- glue:RegisterConnectionType
10+
11+
**New resource types:**
12+
13+
- bedrock-agentcore:browser-profile
14+
- glue:connectionType
15+
16+
**New condition keys:**
17+
18+
- bedrock-agentcore:KmsKeyArn

README.md

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

1818
- 441 Services
19-
- 20270 Actions
20-
- 2144 Resource Types
21-
- 2269 Condition keys
19+
- 20277 Actions
20+
- 2146 Resource Types
21+
- 2270 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.745.0
1+
0.746.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.745.0'
27+
release = '0.746.0'
2828

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

docs/source/index.rst

Lines changed: 3 additions & 3 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
- 441 Services
34-
- 20270 Actions
35-
- 2144 Resource Types
36-
- 2269 Condition keys
34+
- 20277 Actions
35+
- 2146 Resource Types
36+
- 2270 Condition keys
3737

3838
..
3939
/stats

lib/generated/policy-statements/bedrockagentcore.ts

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,21 @@ export class BedrockAgentcore extends PolicyStatement {
187187
return this.to('CreateBrowser');
188188
}
189189

190+
/**
191+
* Grants permission to create a new browser profile
192+
*
193+
* Access Level: Write
194+
*
195+
* Possible conditions:
196+
* - .ifAwsRequestTag()
197+
* - .ifAwsTagKeys()
198+
*
199+
* https://docs.aws.amazon.com/bedrock-agentcore-control/latest/APIReference/API_CreateBrowserProfile.html
200+
*/
201+
public toCreateBrowserProfile() {
202+
return this.to('CreateBrowserProfile');
203+
}
204+
190205
/**
191206
* Grants permission to create a new custom code interpreter
192207
*
@@ -209,6 +224,11 @@ export class BedrockAgentcore extends PolicyStatement {
209224
*
210225
* Access Level: Write
211226
*
227+
* Possible conditions:
228+
* - .ifAwsRequestTag()
229+
* - .ifAwsResourceTag()
230+
* - .ifAwsTagKeys()
231+
*
212232
* https://docs.aws.amazon.com/bedrock-agentcore-control/latest/APIReference/API_CreateEvaluator.html
213233
*/
214234
public toCreateEvaluator() {
@@ -267,6 +287,7 @@ export class BedrockAgentcore extends PolicyStatement {
267287
* Possible conditions:
268288
* - .ifAwsRequestTag()
269289
* - .ifAwsTagKeys()
290+
* - .ifKmsKeyArn()
270291
*
271292
* Dependent actions:
272293
* - iam:PassRole
@@ -297,6 +318,11 @@ export class BedrockAgentcore extends PolicyStatement {
297318
*
298319
* Access Level: Write
299320
*
321+
* Possible conditions:
322+
* - .ifAwsRequestTag()
323+
* - .ifAwsResourceTag()
324+
* - .ifAwsTagKeys()
325+
*
300326
* Dependent actions:
301327
* - iam:PassRole
302328
*
@@ -387,6 +413,17 @@ export class BedrockAgentcore extends PolicyStatement {
387413
return this.to('DeleteBrowser');
388414
}
389415

416+
/**
417+
* Grants permission to delete a browser profile
418+
*
419+
* Access Level: Write
420+
*
421+
* https://docs.aws.amazon.com/bedrock-agentcore-control/latest/APIReference/API_DeleteBrowserProfile.html
422+
*/
423+
public toDeleteBrowserProfile() {
424+
return this.to('DeleteBrowserProfile');
425+
}
426+
390427
/**
391428
* Grants permission to delete a custom code interpreter
392429
*
@@ -600,6 +637,17 @@ export class BedrockAgentcore extends PolicyStatement {
600637
return this.to('GetBrowser');
601638
}
602639

640+
/**
641+
* Grants permission to get details of a browser profile
642+
*
643+
* Access Level: Read
644+
*
645+
* https://docs.aws.amazon.com/bedrock-agentcore-control/latest/APIReference/API_GetBrowserProfile.html
646+
*/
647+
public toGetBrowserProfile() {
648+
return this.to('GetBrowserProfile');
649+
}
650+
603651
/**
604652
* Grants permission to get details of a browser session
605653
*
@@ -977,6 +1025,17 @@ export class BedrockAgentcore extends PolicyStatement {
9771025
return this.to('ListApiKeyCredentialProviders');
9781026
}
9791027

1028+
/**
1029+
* Grants permission to list browser profiles
1030+
*
1031+
* Access Level: List
1032+
*
1033+
* https://docs.aws.amazon.com/bedrock-agentcore-control/latest/APIReference/API_ListBrowserProfiles.html
1034+
*/
1035+
public toListBrowserProfiles() {
1036+
return this.to('ListBrowserProfiles');
1037+
}
1038+
9801039
/**
9811040
* Grants permission to list browser sessions
9821041
*
@@ -1267,6 +1326,17 @@ export class BedrockAgentcore extends PolicyStatement {
12671326
return this.to('RetrieveMemoryRecords');
12681327
}
12691328

1329+
/**
1330+
* Grants permission to save a browser session profile
1331+
*
1332+
* Access Level: Write
1333+
*
1334+
* https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/API_SaveBrowserSessionProfile.html
1335+
*/
1336+
public toSaveBrowserSessionProfile() {
1337+
return this.to('SaveBrowserSessionProfile');
1338+
}
1339+
12701340
/**
12711341
* Grants permission to associate a Customer Managed Key (CMK) or a Service Managed Key with a specific TokenVault
12721342
*
@@ -1577,6 +1647,7 @@ export class BedrockAgentcore extends PolicyStatement {
15771647
'CreateAgentRuntimeEndpoint',
15781648
'CreateApiKeyCredentialProvider',
15791649
'CreateBrowser',
1650+
'CreateBrowserProfile',
15801651
'CreateCodeInterpreter',
15811652
'CreateEvaluator',
15821653
'CreateEvent',
@@ -1592,6 +1663,7 @@ export class BedrockAgentcore extends PolicyStatement {
15921663
'DeleteAgentRuntimeEndpoint',
15931664
'DeleteApiKeyCredentialProvider',
15941665
'DeleteBrowser',
1666+
'DeleteBrowserProfile',
15951667
'DeleteCodeInterpreter',
15961668
'DeleteEvaluator',
15971669
'DeleteEvent',
@@ -1615,6 +1687,7 @@ export class BedrockAgentcore extends PolicyStatement {
16151687
'InvokeAgentRuntimeWithWebSocketStreamForUser',
16161688
'InvokeCodeInterpreter',
16171689
'PutResourcePolicy',
1690+
'SaveBrowserSessionProfile',
16181691
'StartBrowserSession',
16191692
'StartCodeInterpreterSession',
16201693
'StartMemoryExtractionJob',
@@ -1645,6 +1718,7 @@ export class BedrockAgentcore extends PolicyStatement {
16451718
'GetAgentRuntimeEndpoint',
16461719
'GetApiKeyCredentialProvider',
16471720
'GetBrowser',
1721+
'GetBrowserProfile',
16481722
'GetBrowserSession',
16491723
'GetCodeInterpreter',
16501724
'GetCodeInterpreterSession',
@@ -1674,6 +1748,7 @@ export class BedrockAgentcore extends PolicyStatement {
16741748
'ListAgentRuntimeEndpoints',
16751749
'ListAgentRuntimeVersions',
16761750
'ListAgentRuntimes',
1751+
'ListBrowserProfiles',
16771752
'ListBrowserSessions',
16781753
'ListBrowsers',
16791754
'ListCodeInterpreterSessions',
@@ -1709,6 +1784,9 @@ export class BedrockAgentcore extends PolicyStatement {
17091784
* @param account - Account of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's account.
17101785
* @param region - Region of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's region.
17111786
* @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.
1787+
*
1788+
* Possible conditions:
1789+
* - .ifAwsResourceTag()
17121790
*/
17131791
public onEvaluator(evaluatorId: string, account?: string, region?: string, partition?: string) {
17141792
return this.on(`arn:${ partition ?? this.defaultPartition }:bedrock-agentcore:${ region ?? this.defaultRegion }:${ account ?? this.defaultAccount }:evaluator/${ evaluatorId }`);
@@ -1723,6 +1801,9 @@ export class BedrockAgentcore extends PolicyStatement {
17231801
* @param account - Account of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's account.
17241802
* @param region - Region of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's region.
17251803
* @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.
1804+
*
1805+
* Possible conditions:
1806+
* - .ifAwsResourceTag()
17261807
*/
17271808
public onOnlineEvaluationConfig(onlineEvaluationConfigId: string, account?: string, region?: string, partition?: string) {
17281809
return this.on(`arn:${ partition ?? this.defaultPartition }:bedrock-agentcore:${ region ?? this.defaultRegion }:${ account ?? this.defaultAccount }:online-evaluation-config/${ onlineEvaluationConfigId }`);
@@ -1911,6 +1992,22 @@ export class BedrockAgentcore extends PolicyStatement {
19111992
return this.on(`arn:${ partition ?? this.defaultPartition }:bedrock-agentcore:${ region ?? this.defaultRegion }:aws:browser/${ browserId }`);
19121993
}
19131994

1995+
/**
1996+
* Adds a resource of type browser-profile to the statement
1997+
*
1998+
* https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/browserProfile.html
1999+
*
2000+
* @param browserProfileId - Identifier for the browserProfileId.
2001+
* @param region - Region of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's region.
2002+
* @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.
2003+
*
2004+
* Possible conditions:
2005+
* - .ifAwsResourceTag()
2006+
*/
2007+
public onBrowserProfile(browserProfileId: string, region?: string, partition?: string) {
2008+
return this.on(`arn:${ partition ?? this.defaultPartition }:bedrock-agentcore:${ region ?? this.defaultRegion }:aws:browser-profile/${ browserProfileId }`);
2009+
}
2010+
19142011
/**
19152012
* Adds a resource of type workload-identity-directory to the statement
19162013
*
@@ -1999,10 +2096,13 @@ export class BedrockAgentcore extends PolicyStatement {
19992096
* - .toCreateAgentRuntimeEndpoint()
20002097
* - .toCreateApiKeyCredentialProvider()
20012098
* - .toCreateBrowser()
2099+
* - .toCreateBrowserProfile()
20022100
* - .toCreateCodeInterpreter()
2101+
* - .toCreateEvaluator()
20032102
* - .toCreateGateway()
20042103
* - .toCreateMemory()
20052104
* - .toCreateOauth2CredentialProvider()
2105+
* - .toCreateOnlineEvaluationConfig()
20062106
* - .toCreateWorkloadIdentity()
20072107
* - .toTagResource()
20082108
*
@@ -2019,7 +2119,13 @@ export class BedrockAgentcore extends PolicyStatement {
20192119
*
20202120
* https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-globally-available
20212121
*
2122+
* Applies to actions:
2123+
* - .toCreateEvaluator()
2124+
* - .toCreateOnlineEvaluationConfig()
2125+
*
20222126
* Applies to resource types:
2127+
* - evaluator
2128+
* - online-evaluation-config
20232129
* - memory
20242130
* - gateway
20252131
* - workload-identity
@@ -2029,6 +2135,7 @@ export class BedrockAgentcore extends PolicyStatement {
20292135
* - runtime-endpoint
20302136
* - code-interpreter-custom
20312137
* - browser-custom
2138+
* - browser-profile
20322139
* - workload-identity-directory
20332140
* - token-vault
20342141
*
@@ -2050,10 +2157,13 @@ export class BedrockAgentcore extends PolicyStatement {
20502157
* - .toCreateAgentRuntimeEndpoint()
20512158
* - .toCreateApiKeyCredentialProvider()
20522159
* - .toCreateBrowser()
2160+
* - .toCreateBrowserProfile()
20532161
* - .toCreateCodeInterpreter()
2162+
* - .toCreateEvaluator()
20542163
* - .toCreateGateway()
20552164
* - .toCreateMemory()
20562165
* - .toCreateOauth2CredentialProvider()
2166+
* - .toCreateOnlineEvaluationConfig()
20572167
* - .toCreateWorkloadIdentity()
20582168
* - .toTagResource()
20592169
* - .toUntagResource()
@@ -2157,6 +2267,21 @@ export class BedrockAgentcore extends PolicyStatement {
21572267
return this.if(`InboundJwtClaim/sub`, value, operator ?? 'StringLike');
21582268
}
21592269

2270+
/**
2271+
* Filters access by KMS Key arn provided
2272+
*
2273+
* https://docs.aws.amazon.com/bedrock-agentcore/latest/APIReference/#condition-keys-kmsKeyArn
2274+
*
2275+
* Applies to actions:
2276+
* - .toCreateMemory()
2277+
*
2278+
* @param value The value(s) to check
2279+
* @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike`
2280+
*/
2281+
public ifKmsKeyArn(value: string | string[], operator?: Operator | string) {
2282+
return this.if(`KmsKeyArn`, value, operator ?? 'StringLike');
2283+
}
2284+
21602285
/**
21612286
* Filters access by Actor Id
21622287
*

0 commit comments

Comments
 (0)