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();
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
(experimental) A fluent builder forHttpApiCall
.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
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
-
Constructor Summary
ModifierConstructorDescriptionprotected
HttpApiCall
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
HttpApiCall
(software.amazon.jsii.JsiiObjectRef objRef) HttpApiCall
(software.constructs.Construct scope, String id, HttpCallProps props) -
Method Summary
Modifier and TypeMethodDescriptionassertAtPath
(String _path, ExpectedResult _expected) (experimental) Assert that the ExpectedResult is equal to the result of the AwsApiCall at the given path.protected CustomResource
(experimental) access the AssertionsProvider.(experimental) Wait for the IApiCall to return the expected response.(experimental) Wait for the IApiCall to return the expected response.Methods inherited from class software.amazon.awscdk.integtests.alpha.ApiCallBase
expect, getAtt, getAttString, getExpectedResult, getFlattenResponse, getOutputPaths, getStateMachineArn, next, setExpectedResult, setFlattenResponse, setOutputPaths, setStateMachineArn
Methods inherited from class software.constructs.Construct
getNode, isConstruct, 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.constructs.IConstruct
getNode
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
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 interfaceIApiCall
- Specified by:
assertAtPath
in classApiCallBase
- 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 interfaceIApiCall
- Specified by:
waitForAssertions
in classApiCallBase
- Parameters:
options
-
-
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 interfaceIApiCall
- Specified by:
waitForAssertions
in classApiCallBase
-
getApiCallResource
- Specified by:
getApiCallResource
in classApiCallBase
-
getProvider
(experimental) access the AssertionsProvider.This can be used to add additional IAM policies the the provider role policy
- Specified by:
getProvider
in interfaceIApiCall
- Specified by:
getProvider
in classApiCallBase
-