@Generated(value="jsii-pacmak/1.70.0 (build 03c2f6f)", date="2022-11-01T13:16:58.389Z") @Stability(value=Experimental) public interface IAwsApiCall extends software.amazon.jsii.JsiiSerializable, IConstruct
| Modifier and Type | Interface and Description |
|---|---|
static interface |
IAwsApiCall.Jsii$Default
Internal default implementation for
IAwsApiCall. |
static class |
IAwsApiCall.Jsii$Proxy
A proxy class which represents a concrete javascript instance of this type.
|
| Modifier and Type | Method and Description |
|---|---|
void |
assertAtPath(String path,
ExpectedResult expected)
(experimental) Assert that the ExpectedResult is equal to the result of the AwsApiCall at the given path.
|
void |
expect(ExpectedResult expected)
(experimental) Assert that the ExpectedResult is equal to the result of the AwsApiCall.
|
Reference |
getAtt(String attributeName)
(experimental) Returns the value of an attribute of the custom resource of an arbitrary type.
|
String |
getAttString(String attributeName)
(experimental) Returns the value of an attribute of the custom resource of type string.
|
getNode@Stability(value=Experimental)
void assertAtPath(@NotNull
String path,
@NotNull
ExpectedResult expected)
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())));
IAwsApiCall message = integ.assertions.awsApiCall("SQS", "receiveMessage");
message.assertAtPath("Messages.0.Body", ExpectedResult.stringLikeRegexp("hello"));
path - This parameter is required.expected - This parameter is required.@Stability(value=Experimental)
void expect(@NotNull
ExpectedResult expected)
Example:
IntegTest integ;
IAwsApiCall invoke = integ.assertions.invokeFunction(LambdaInvokeFunctionProps.builder()
.functionName("my-func")
.build());
invoke.expect(ExpectedResult.objectLike(Map.of("Payload", "OK")));
expected - This parameter is required.@Stability(value=Experimental) @NotNull Reference getAtt(@NotNull String attributeName)
Attributes are returned from the custom resource provider through the
Data map where the key is the attribute name.
attributeName - the name of the attribute. This parameter is required.@Stability(value=Experimental) @NotNull String getAttString(@NotNull String attributeName)
Attributes are returned from the custom resource provider through the
Data map where the key is the attribute name.
attributeName - the name of the attribute. This parameter is required.Copyright © 2022. All rights reserved.