@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:40.880Z") public interface IAwsApiCall extends 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(java.lang.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(java.lang.String attributeName)
(experimental) Returns the value of an attribute of the custom resource of an arbitrary type.
|
java.lang.String |
getAttString(java.lang.String attributeName)
(experimental) Returns the value of an attribute of the custom resource of type string.
|
getNode
void assertAtPath(java.lang.String path, 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.void expect(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.Reference getAtt(java.lang.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.java.lang.String getAttString(java.lang.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.