Class AwsApiCall
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.integtests.AwsApiCall
- All Implemented Interfaces:
IConstruct,IDependable,IAwsApiCall,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
- Direct Known Subclasses:
LambdaInvokeFunction
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:36.690Z")
@Stability(Experimental)
public class AwsApiCall
extends Construct
implements IAwsApiCall
(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
Nested ClassesModifier and TypeClassDescriptionstatic final class(experimental) A fluent builder forAwsApiCall.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.integtests.IAwsApiCall
IAwsApiCall.Jsii$Default, IAwsApiCall.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default, IConstruct.Jsii$ProxyNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAwsApiCall(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedAwsApiCall(software.amazon.jsii.JsiiObjectRef objRef) AwsApiCall(software.constructs.Construct scope, String id, AwsApiCallProps props) -
Method Summary
Modifier and TypeMethodDescriptionvoidassertAtPath(String path, ExpectedResult expected) (experimental) Assert that the ExpectedResult is equal to the result of the AwsApiCall at the given path.voidexpect(ExpectedResult expected) (experimental) Assert that the ExpectedResult is equal to the result of the AwsApiCall.(experimental) Returns the value of an attribute of the custom resource of an arbitrary type.getAttString(String attributeName) (experimental) Returns the value of an attribute of the custom resource of type string.protected AssertionsProviderprotected voidsetProvider(AssertionsProvider value) Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.constructs.Construct
toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.awscdk.core.IConstruct
getNodeMethods 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) public void assertAtPath(@NotNull String path, @NotNull ExpectedResult expected) (experimental) Assert that the ExpectedResult is equal to the result of the AwsApiCall at the given path.For example the SQS.receiveMessage api response would look like:
If you wanted to assert the value of
Bodyyou could do- Specified by:
assertAtPathin interfaceIAwsApiCall- Parameters:
path- This parameter is required.expected- This parameter is required.
-
expect
(experimental) Assert that the ExpectedResult is equal to the result of the AwsApiCall.- Specified by:
expectin interfaceIAwsApiCall- Parameters:
expected- This parameter is required.
-
getAtt
(experimental) Returns the value of an attribute of the custom resource of an arbitrary type.Attributes are returned from the custom resource provider through the
Datamap where the key is the attribute name.- Specified by:
getAttin interfaceIAwsApiCall- Parameters:
attributeName- This parameter is required.- Returns:
- a token for
Fn::GetAtt. UseToken.asXxxto encode the returnedReferenceas a specific type or use the conveniencegetAttStringfor string attributes.
-
getAttString
(experimental) Returns the value of an attribute of the custom resource of type string.Attributes are returned from the custom resource provider through the
Datamap where the key is the attribute name.- Specified by:
getAttStringin interfaceIAwsApiCall- Parameters:
attributeName- This parameter is required.- Returns:
- a token for
Fn::GetAttencoded as a string.
-
getProvider
-
setProvider
-