Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(release): 2.116.0 #28458

Merged
merged 3 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 0 additions & 29 deletions packages/@aws-cdk/integ-tests-alpha/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -522,32 +522,3 @@ const describe = testCase.assertions.awsApiCall('StepFunctions', 'describeExecut
});
```

When `waitForAssertions()` is used for the `awsApiCall`, the actual API call is executed
by the `waiterProvider` assertion provider.

By default, the `AwsApiCall` construct will automatically add the correct IAM policies
to allow the Lambda function to make the API call. It does this based on the `service`
and `api` that is provided. In the above example the service is `SQS` and the api is
`receiveMessage` so it will create a policy with `Action: 'sqs:ReceiveMessage`.

There are some cases where the permissions do not exactly match the service/api call, for
example the S3 `listObjectsV2` api. In these cases it is possible to add the correct policy
by accessing the `waiterProvider` object.

```ts
declare const integ: IntegTest;

const apiCall = integ.assertions.awsApiCall('S3', 'listObjectsV2', {
Bucket: 'mybucket',
}).waitForAssertions({
totalTimeout: Duration.minutes(5),
interval: Duration.seconds(15),
backoffRate: 3,
});

apiCall.waiterProvider?.addToRolePolicy({
Effect: 'Allow',
Action: ['s3:GetObject', 's3:ListBucket'],
Resource: ['*'],
});
```
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import { WaiterStateMachineOptions } from './waiter-state-machine';
*/
export interface IApiCall extends IConstruct {
/**
* Access the AssertionsProvider. This can be used to add additional IAM policies
* to the provider role policy.
* access the AssertionsProvider. This can be used to add additional IAM policies
* the the provider role policy
*
* @example
* declare const apiCall: AwsApiCall;
Expand All @@ -22,21 +22,6 @@ export interface IApiCall extends IConstruct {
*/
readonly provider: AssertionsProvider;

/**
* Access the AssertionsProvider for the waiter state machine.
* This can be used to add additional IAM policies
* to the provider role policy.
*
* @example
* declare const apiCall: AwsApiCall;
* apiCall.waiterProvider?.addToRolePolicy({
* Effect: 'Allow',
* Action: ['s3:GetObject'],
* Resource: ['*'],
* });
*/
readonly waiterProvider?: AssertionsProvider;

/**
* Returns the value of an attribute of the custom resource of an arbitrary
* type. Attributes are returned from the custom resource provider through the
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading