Class AwsApiCall
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.integtests.alpha.ApiCallBase
software.amazon.awscdk.integtests.alpha.AwsApiCall
- All Implemented Interfaces:
IApiCall
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
- Direct Known Subclasses:
LambdaInvokeFunction
@Generated(value="jsii-pacmak/1.97.0 (build 729de35)",
date="2024-04-18T17:54:26.411Z")
@Stability(Experimental)
public class AwsApiCall
extends ApiCallBase
(experimental) Construct that creates a custom resource that will perform a query using the AWS SDK.
Example:
Stack myAppStack; AwsApiCall.Builder.create(myAppStack, "GetObject") .service("S3") .api("getObject") .build();
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
(experimental) A fluent builder forAwsApiCall
.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.integtests.alpha.IApiCall
IApiCall.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
-
Constructor Summary
ModifierConstructorDescriptionprotected
AwsApiCall
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
AwsApiCall
(software.amazon.jsii.JsiiObjectRef objRef) AwsApiCall
(software.constructs.Construct scope, String id, AwsApiCallProps props) -
Method Summary
Modifier and TypeMethodDescriptionassertAtPath
(String path, ExpectedResult expected) (experimental) Assert that the ExpectedResult is equal to the result of the AwsApiCall at the given path.protected CustomResource
(experimental) access the AssertionsProvider.(experimental) access the AssertionsProvider for the waiter state machine.void
(experimental) access the AssertionsProvider for the waiter state machine.(experimental) Wait for the IApiCall to return the expected response.(experimental) Wait for the IApiCall to return the expected response.Methods inherited from class software.amazon.awscdk.integtests.alpha.ApiCallBase
expect, getAtt, getAttString, getExpectedResult, getFlattenResponse, getOutputPaths, getStateMachineArn, next, setExpectedResult, setFlattenResponse, setOutputPaths, setStateMachineArn
Methods inherited from class software.constructs.Construct
getNode, isConstruct, toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.constructs.IConstruct
getNode
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
AwsApiCall
protected AwsApiCall(software.amazon.jsii.JsiiObjectRef objRef) -
AwsApiCall
protected AwsApiCall(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
AwsApiCall
@Stability(Experimental) public AwsApiCall(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull AwsApiCallProps props) - Parameters:
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.
-
-
Method Details
-
assertAtPath
@Stability(Experimental) @NotNull public IApiCall assertAtPath(@NotNull String path, @NotNull ExpectedResult expected) (experimental) Assert that the ExpectedResult is equal to the result of the AwsApiCall at the given path.Providing a path will filter the output of the initial API call.
For example the SQS.receiveMessage api response would look like:
If you wanted to assert the value of
Body
you could do- Specified by:
assertAtPath
in interfaceIApiCall
- Specified by:
assertAtPath
in classApiCallBase
- Parameters:
path
- This parameter is required.expected
- This parameter is required.
-
waitForAssertions
@Stability(Experimental) @NotNull public IApiCall waitForAssertions(@Nullable WaiterStateMachineOptions options) (experimental) Wait for the IApiCall to return the expected response.If no expected response is specified then it will wait for the IApiCall to return a success
- Specified by:
waitForAssertions
in interfaceIApiCall
- Specified by:
waitForAssertions
in classApiCallBase
- Parameters:
options
-
-
waitForAssertions
(experimental) Wait for the IApiCall to return the expected response.If no expected response is specified then it will wait for the IApiCall to return a success
- Specified by:
waitForAssertions
in interfaceIApiCall
- Specified by:
waitForAssertions
in classApiCallBase
-
getApiCallResource
- Specified by:
getApiCallResource
in classApiCallBase
-
getProvider
(experimental) access the AssertionsProvider.This can be used to add additional IAM policies the the provider role policy
- Specified by:
getProvider
in interfaceIApiCall
- Specified by:
getProvider
in classApiCallBase
-
getWaiterProvider
(experimental) access the AssertionsProvider for the waiter state machine.This can be used to add additional IAM policies the the provider role policy
Example:
AwsApiCall apiCall; apiCall.waiterProvider.addToRolePolicy(Map.of( "Effect", "Allow", "Action", List.of("s3:GetObject"), "Resource", List.of("*")));
-
setWaiterProvider
(experimental) access the AssertionsProvider for the waiter state machine.This can be used to add additional IAM policies the the provider role policy
Example:
AwsApiCall apiCall; apiCall.waiterProvider.addToRolePolicy(Map.of( "Effect", "Allow", "Action", List.of("s3:GetObject"), "Resource", List.of("*")));
-