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 Classes
    Modifier and Type
    Class
    Description
    static final class 
    (experimental) A fluent builder for AwsApiCall.

    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.IAwsApiCall

    IAwsApiCall.Jsii$Default, IAwsApiCall.Jsii$Proxy

    Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct

    IConstruct.Jsii$Default, IConstruct.Jsii$Proxy

    Nested classes/interfaces inherited from interface software.constructs.IConstruct

    software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    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 Type
    Method
    Description
    void
    (experimental) Assert that the ExpectedResult is equal to the result of the AwsApiCall at the given path.
    void
    (experimental) Assert that the ExpectedResult is equal to the result of the AwsApiCall.
    getAtt(String attributeName)
    (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 void
     

    Methods inherited from class software.amazon.awscdk.core.Construct

    getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate

    Methods inherited from class software.constructs.Construct

    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.amazon.awscdk.core.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) 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 Body you could do

      Specified by:
      assertAtPath in interface IAwsApiCall
      Parameters:
      path - This parameter is required.
      expected - This parameter is required.
    • expect

      @Stability(Experimental) public void expect(@NotNull ExpectedResult expected)
      (experimental) Assert that the ExpectedResult is equal to the result of the AwsApiCall.

      Specified by:
      expect in interface IAwsApiCall
      Parameters:
      expected - This parameter is required.
    • getAtt

      @Stability(Experimental) @NotNull public Reference getAtt(@NotNull String attributeName)
      (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 Data map where the key is the attribute name.

      Specified by:
      getAtt in interface IAwsApiCall
      Parameters:
      attributeName - This parameter is required.
      Returns:
      a token for Fn::GetAtt. Use Token.asXxx to encode the returned Reference as a specific type or use the convenience getAttString for string attributes.
    • getAttString

      @Stability(Experimental) @NotNull public String getAttString(@NotNull String attributeName)
      (experimental) Returns the value of an attribute of the custom resource of type string.

      Attributes are returned from the custom resource provider through the Data map where the key is the attribute name.

      Specified by:
      getAttString in interface IAwsApiCall
      Parameters:
      attributeName - This parameter is required.
      Returns:
      a token for Fn::GetAtt encoded as a string.
    • getProvider

      @Stability(Experimental) @NotNull protected AssertionsProvider getProvider()
    • setProvider

      @Stability(Experimental) protected void setProvider(@NotNull AssertionsProvider value)