Class ApiCallBase

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.integtests.alpha.ApiCallBase
All Implemented Interfaces:
IApiCall, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable
Direct Known Subclasses:
AwsApiCall, HttpApiCall

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:34:11.519Z") @Stability(Experimental) public abstract class ApiCallBase extends software.constructs.Construct implements IApiCall
(experimental) Base class for an ApiCall.
  • Constructor Details

    • ApiCallBase

      protected ApiCallBase(software.amazon.jsii.JsiiObjectRef objRef)
    • ApiCallBase

      protected ApiCallBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • ApiCallBase

      @Stability(Experimental) protected ApiCallBase(@NotNull software.constructs.Construct scope, @NotNull String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
  • Method Details

    • assertAtPath

      @Stability(Experimental) @NotNull public abstract 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 interface IApiCall
      Parameters:
      path - This parameter is required.
      expected - This parameter is required.
    • expect

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

      Specified by:
      expect in interface IApiCall
      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 IApiCall
      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 IApiCall
      Parameters:
      attributeName - This parameter is required.
      Returns:
      a token for Fn::GetAtt encoded as a string.
    • next

      @Stability(Experimental) @NotNull public IApiCall next(@NotNull IApiCall next)
      (experimental) Allows you to chain IApiCalls. This adds an explicit dependency betweent the two resources.

      Returns the IApiCall provided as next

      Specified by:
      next in interface IApiCall
      Parameters:
      next - This parameter is required.
    • waitForAssertions

      @Stability(Experimental) @NotNull public abstract 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 interface IApiCall
      Parameters:
      options -
    • waitForAssertions

      @Stability(Experimental) @NotNull public abstract IApiCall 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 interface IApiCall
    • getApiCallResource

      @Stability(Experimental) @NotNull protected abstract CustomResource getApiCallResource()
    • getProvider

      @Stability(Experimental) @NotNull public abstract AssertionsProvider getProvider()
      (experimental) access the AssertionsProvider.

      This can be used to add additional IAM policies the the provider role policy

      Specified by:
      getProvider in interface IApiCall
    • getFlattenResponse

      @Stability(Experimental) @NotNull protected String getFlattenResponse()
    • setFlattenResponse

      @Stability(Experimental) protected void setFlattenResponse(@NotNull String value)
    • getExpectedResult

      @Stability(Experimental) @Nullable protected String getExpectedResult()
    • setExpectedResult

      @Stability(Experimental) protected void setExpectedResult(@Nullable String value)
    • getOutputPaths

      @Stability(Experimental) @Nullable protected List<String> getOutputPaths()
    • setOutputPaths

      @Stability(Experimental) protected void setOutputPaths(@Nullable List<String> value)
    • getStateMachineArn

      @Stability(Experimental) @Nullable protected String getStateMachineArn()
    • setStateMachineArn

      @Stability(Experimental) protected void setStateMachineArn(@Nullable String value)