Class HttpApiCall

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

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2025-01-15T21:09:28.962Z") @Stability(Experimental) public class HttpApiCall extends ApiCallBase
(experimental) Construct that creates a custom resource that will perform an HTTP API Call.

Example:

 Stack stack;
 HttpApiCall.Builder.create(stack, "MyAsssertion")
         .url("https://example-api.com/abc")
         .build();
 
  • Constructor Details

    • HttpApiCall

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

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

      @Stability(Experimental) public HttpApiCall(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull HttpCallProps 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 interface IApiCall
      Specified by:
      assertAtPath in class ApiCallBase
      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 interface IApiCall
      Specified by:
      waitForAssertions in class ApiCallBase
      Parameters:
      options -
    • waitForAssertions

      @Stability(Experimental) @NotNull public 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
      Specified by:
      waitForAssertions in class ApiCallBase
    • getApiCallResource

      @Stability(Experimental) @NotNull protected CustomResource getApiCallResource()
      Specified by:
      getApiCallResource in class ApiCallBase
    • getProvider

      @Stability(Experimental) @NotNull public 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
      Specified by:
      getProvider in class ApiCallBase