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

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

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

/**
 * (experimental) Represents an ApiCall.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-24T10:56:41.768Z")
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.integtests.alpha.$Module.class, fqn = "@aws-cdk/integ-tests-alpha.IApiCall")
@software.amazon.jsii.Jsii.Proxy(IApiCall.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface IApiCall extends software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct {

    /**
     * (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("*")));
     * 
*/ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull software.amazon.awscdk.integtests.alpha.AssertionsProvider getProvider(); /** * (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"));
     * 
*

* @param path This parameter is required. * @param expected This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @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); /** * (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")));
     * 
*

* @param expected This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull software.amazon.awscdk.integtests.alpha.IApiCall expect(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.integtests.alpha.ExpectedResult expected); /** * (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. *

* @return 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. * @param attributeName the name of the attribute. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull software.amazon.awscdk.Reference getAtt(final @org.jetbrains.annotations.NotNull java.lang.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. *

* @return a token for Fn::GetAtt encoded as a string. * @param attributeName the name of the attribute. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull java.lang.String getAttString(final @org.jetbrains.annotations.NotNull java.lang.String attributeName); /** * (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);
     * 
*

* @param next This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull software.amazon.awscdk.integtests.alpha.IApiCall next(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.integtests.alpha.IApiCall next); /** * (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();
     * 
*

* @param options */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull software.amazon.awscdk.integtests.alpha.IApiCall waitForAssertions(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.integtests.alpha.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();
     * 
*/ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull software.amazon.awscdk.integtests.alpha.IApiCall waitForAssertions(); /** * A proxy class which represents a concrete javascript instance of this type. */ @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.awscdk.integtests.alpha.IApiCall.Jsii$Default { protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } /** * The tree node. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public final @org.jetbrains.annotations.NotNull software.constructs.Node getNode() { return software.amazon.jsii.Kernel.get(this, "node", software.amazon.jsii.NativeType.forClass(software.constructs.Node.class)); } /** * (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("*")));
         * 
*/ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public final @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) 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"));
         * 
*

* @param path This parameter is required. * @param expected This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public final @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) 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")));
         * 
*

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

* @return 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. * @param attributeName the name of the attribute. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public final @org.jetbrains.annotations.NotNull software.amazon.awscdk.Reference getAtt(final @org.jetbrains.annotations.NotNull java.lang.String attributeName) { return software.amazon.jsii.Kernel.call(this, "getAtt", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.Reference.class), new Object[] { java.util.Objects.requireNonNull(attributeName, "attributeName is required") }); } /** * (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. *

* @return a token for Fn::GetAtt encoded as a string. * @param attributeName the name of the attribute. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public final @org.jetbrains.annotations.NotNull java.lang.String getAttString(final @org.jetbrains.annotations.NotNull java.lang.String attributeName) { return software.amazon.jsii.Kernel.call(this, "getAttString", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { java.util.Objects.requireNonNull(attributeName, "attributeName is required") }); } /** * (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);
         * 
*

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

* Example: *

*

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

* @param options */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public final @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 *

* Example: *

*

         * IntegTest integ;
         * String executionArn;
         * integ.assertions.awsApiCall("StepFunctions", "describeExecution", Map.of(
         *         "executionArn", executionArn)).waitForAssertions();
         * 
*/ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public final @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)); } } /** * Internal default implementation for {@link IApiCall}. */ @software.amazon.jsii.Internal interface Jsii$Default extends IApiCall, software.constructs.IConstruct.Jsii$Default { /** * The tree node. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.NotNull software.constructs.Node getNode() { return software.amazon.jsii.Kernel.get(this, "node", software.amazon.jsii.NativeType.forClass(software.constructs.Node.class)); } /** * (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("*")));
         * 
*/ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @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) 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"));
         * 
*

* @param path This parameter is required. * @param expected This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override default @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) 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")));
         * 
*

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

* @return 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. * @param attributeName the name of the attribute. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override default @org.jetbrains.annotations.NotNull software.amazon.awscdk.Reference getAtt(final @org.jetbrains.annotations.NotNull java.lang.String attributeName) { return software.amazon.jsii.Kernel.call(this, "getAtt", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.Reference.class), new Object[] { java.util.Objects.requireNonNull(attributeName, "attributeName is required") }); } /** * (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. *

* @return a token for Fn::GetAtt encoded as a string. * @param attributeName the name of the attribute. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override default @org.jetbrains.annotations.NotNull java.lang.String getAttString(final @org.jetbrains.annotations.NotNull java.lang.String attributeName) { return software.amazon.jsii.Kernel.call(this, "getAttString", software.amazon.jsii.NativeType.forClass(java.lang.String.class), new Object[] { java.util.Objects.requireNonNull(attributeName, "attributeName is required") }); } /** * (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);
         * 
*

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

* Example: *

*

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

* @param options */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override default @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 }); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy