Class IApiCall.Jsii$Proxy

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.integtests.alpha.IApiCall.Jsii$Proxy
All Implemented Interfaces:
IApiCall, IApiCall.Jsii$Default, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IConstruct.Jsii$Default, software.constructs.IDependable, software.constructs.IDependable.Jsii$Default
Enclosing interface:
IApiCall

@Internal public static final class IApiCall.Jsii$Proxy extends software.amazon.jsii.JsiiObject implements IApiCall.Jsii$Default
A proxy class which represents a concrete javascript instance of this type.
  • Nested Class Summary

    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, IApiCall.Jsii$Proxy

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

    software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy

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

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

    Constructors
    Modifier
    Constructor
    Description
    protected
    Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final IApiCall
    (experimental) Assert that the ExpectedResult is equal to the result of the AwsApiCall at the given path.
    final IApiCall
    (experimental) Assert that the ExpectedResult is equal to the result of the AwsApiCall.
    final Reference
    getAtt(String attributeName)
    (experimental) Returns the value of an attribute of the custom resource of an arbitrary type.
    final String
    getAttString(String attributeName)
    (experimental) Returns the value of an attribute of the custom resource of type string.
    final software.constructs.Node
    The tree node.
    (experimental) access the AssertionsProvider.
    final IApiCall
    next(IApiCall next)
    (experimental) Allows you to chain IApiCalls.
    final IApiCall
    (experimental) Wait for the IApiCall to return the expected response.
    final IApiCall
    (experimental) Wait for the IApiCall to return the expected response.

    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, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • Jsii$Proxy

      protected Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
  • Method Details

    • getNode

      @Stability(Stable) @NotNull public final software.constructs.Node getNode()
      The tree node.
      Specified by:
      getNode in interface IApiCall.Jsii$Default
      Specified by:
      getNode in interface software.constructs.IConstruct
      Specified by:
      getNode in interface software.constructs.IConstruct.Jsii$Default
    • getProvider

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

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

      Example:

       AwsApiCall apiCall;
       apiCall.provider.addToRolePolicy(Map.of(
               "Effect", "Allow",
               "Action", List.of("s3:GetObject"),
               "Resource", List.of("*")));
       
      Specified by:
      getProvider in interface IApiCall
      Specified by:
      getProvider in interface IApiCall.Jsii$Default
    • assertAtPath

      @Stability(Experimental) @NotNull public final 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

      Example:

       IntegTest integ;
       Map<String, Map<String, Object>[]> actual = Map.of(
               "Messages", List.of(Map.of(
                       "MessageId", "",
                       "ReceiptHandle", "",
                       "MD5OfBody", "",
                       "Body", "hello",
                       "Attributes", Map.of(),
                       "MD5OfMessageAttributes", Map.of(),
                       "MessageAttributes", Map.of())));
       IApiCall message = integ.assertions.awsApiCall("SQS", "receiveMessage");
       message.assertAtPath("Messages.0.Body", ExpectedResult.stringLikeRegexp("hello"));
       

      Specified by:
      assertAtPath in interface IApiCall
      Specified by:
      assertAtPath in interface IApiCall.Jsii$Default
      Parameters:
      path - This parameter is required.
      expected - This parameter is required.
    • expect

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

      Example:

       IntegTest integ;
       IApiCall invoke = integ.assertions.invokeFunction(LambdaInvokeFunctionProps.builder()
               .functionName("my-func")
               .build());
       invoke.expect(ExpectedResult.objectLike(Map.of("Payload", "OK")));
       

      Specified by:
      expect in interface IApiCall
      Specified by:
      expect in interface IApiCall.Jsii$Default
      Parameters:
      expected - This parameter is required.
    • getAtt

      @Stability(Experimental) @NotNull public final 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
      Specified by:
      getAtt in interface IApiCall.Jsii$Default
      Parameters:
      attributeName - the name of the attribute. 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 final 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
      Specified by:
      getAttString in interface IApiCall.Jsii$Default
      Parameters:
      attributeName - the name of the attribute. This parameter is required.
      Returns:
      a token for Fn::GetAtt encoded as a string.
    • next

      @Stability(Experimental) @NotNull public final 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

      Example:

       IApiCall first;
       IApiCall second;
       first.next(second);
       

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

      @Stability(Experimental) @NotNull public final 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

      Example:

       IntegTest integ;
       String executionArn;
       integ.assertions.awsApiCall("StepFunctions", "describeExecution", Map.of(
               "executionArn", executionArn)).waitForAssertions();
       

      Specified by:
      waitForAssertions in interface IApiCall
      Specified by:
      waitForAssertions in interface IApiCall.Jsii$Default
      Parameters:
      options -
    • waitForAssertions

      @Stability(Experimental) @NotNull public final 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

      Example:

       IntegTest integ;
       String executionArn;
       integ.assertions.awsApiCall("StepFunctions", "describeExecution", Map.of(
               "executionArn", executionArn)).waitForAssertions();
       
      Specified by:
      waitForAssertions in interface IApiCall