Skip to content

Commit 098c4e2

Browse files
authored
docs: correct the addToRolePolicy example (#23014)
This one threw me for a bit as a newbie - using the example as provided resulted in an error: ``` Syntax errors in policy. (Service: AmazonIdentityManagement; Status Code: 400; Error Code: MalformedPolicyDocument; Request ID: <redacted>; Proxy: null) ``` A bit of sleuthing led me to this as the correct format. ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 05690a1 commit 098c4e2

File tree

1 file changed

+2
-2
lines changed
  • packages/@aws-cdk/integ-tests/lib/assertions/providers

1 file changed

+2
-2
lines changed

packages/@aws-cdk/integ-tests/lib/assertions/providers/provider.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,8 @@ export class AssertionsProvider extends Construct {
260260
* declare const provider: AssertionsProvider;
261261
* provider.addToRolePolicy({
262262
* Effect: 'Allow',
263-
* Action: 's3:GetObject',
264-
* Resources: '*',
263+
* Action: ['s3:GetObject'],
264+
* Resource: ['*'],
265265
* });
266266
*/
267267
public addToRolePolicy(statement: any): void {

0 commit comments

Comments
 (0)