All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awscdk.integtests.alpha.HttpApiCall Maven / Gradle / Ivy

There is a newer version: 2.169.0-alpha.0
Show newest version
package software.amazon.awscdk.integtests.alpha;

/**
 * (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();
 * 
*/ @javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-19T18:12:09.663Z") @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Jsii(module = software.amazon.awscdk.integtests.alpha.$Module.class, fqn = "@aws-cdk/integ-tests-alpha.HttpApiCall") public class HttpApiCall extends software.amazon.awscdk.integtests.alpha.ApiCallBase { protected HttpApiCall(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } protected HttpApiCall(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) { super(initializationMode); } /** * @param scope This parameter is required. * @param id This parameter is required. * @param props This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public HttpApiCall(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.integtests.alpha.HttpCallProps props) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") }); } /** * (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 *

* @param _path This parameter is required. * @param _expected This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public @org.jetbrains.annotations.NotNull software.amazon.awscdk.integtests.alpha.IApiCall assertAtPath(final @org.jetbrains.annotations.NotNull java.lang.String _path, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.integtests.alpha.ExpectedResult _expected) { return software.amazon.jsii.Kernel.call(this, "assertAtPath", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.integtests.alpha.IApiCall.class), new Object[] { java.util.Objects.requireNonNull(_path, "_path is required"), java.util.Objects.requireNonNull(_expected, "_expected is required") }); } /** * (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 *

* @param options */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public @org.jetbrains.annotations.NotNull software.amazon.awscdk.integtests.alpha.IApiCall waitForAssertions(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.integtests.alpha.WaiterStateMachineOptions options) { return software.amazon.jsii.Kernel.call(this, "waitForAssertions", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.integtests.alpha.IApiCall.class), new Object[] { 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 */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public @org.jetbrains.annotations.NotNull software.amazon.awscdk.integtests.alpha.IApiCall waitForAssertions() { return software.amazon.jsii.Kernel.call(this, "waitForAssertions", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.integtests.alpha.IApiCall.class)); } /** */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) protected @org.jetbrains.annotations.NotNull software.amazon.awscdk.CustomResource getApiCallResource() { return software.amazon.jsii.Kernel.get(this, "apiCallResource", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.CustomResource.class)); } /** * (experimental) access the AssertionsProvider. *

* This can be used to add additional IAM policies * the the provider role policy */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull software.amazon.awscdk.integtests.alpha.AssertionsProvider getProvider() { return software.amazon.jsii.Kernel.get(this, "provider", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.integtests.alpha.AssertionsProvider.class)); } /** * (experimental) A fluent builder for {@link software.amazon.awscdk.integtests.alpha.HttpApiCall}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { /** * @return a new instance of {@link Builder}. * @param scope This parameter is required. * @param id This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static Builder create(final software.constructs.Construct scope, final java.lang.String id) { return new Builder(scope, id); } private final software.constructs.Construct scope; private final java.lang.String id; private final software.amazon.awscdk.integtests.alpha.HttpCallProps.Builder props; private Builder(final software.constructs.Construct scope, final java.lang.String id) { this.scope = scope; this.id = id; this.props = new software.amazon.awscdk.integtests.alpha.HttpCallProps.Builder(); } /** * (experimental) The url to fetch. *

* @return {@code this} * @param url The url to fetch. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder url(final java.lang.String url) { this.props.url(url); return this; } /** * (experimental) Options for fetch. *

* @return {@code this} * @param fetchOptions Options for fetch. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder fetchOptions(final software.amazon.awscdk.integtests.alpha.FetchOptions fetchOptions) { this.props.fetchOptions(fetchOptions); return this; } /** * @return a newly built instance of {@link software.amazon.awscdk.integtests.alpha.HttpApiCall}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public software.amazon.awscdk.integtests.alpha.HttpApiCall build() { return new software.amazon.awscdk.integtests.alpha.HttpApiCall( this.scope, this.id, this.props.build() ); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy