public static final class IAwsApiCall.Jsii$Proxy extends software.amazon.jsii.JsiiObject implements IAwsApiCall.Jsii$Default
IAwsApiCall.Jsii$Default, IAwsApiCall.Jsii$Proxy
Modifier | Constructor and Description |
---|---|
protected |
Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef) |
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.
|
ConstructNode |
getNode()
The construct tree node for this construct.
|
public final ConstructNode getNode()
getNode
in interface IConstruct
getNode
in interface IConstruct.Jsii$Default
getNode
in interface IAwsApiCall.Jsii$Default
public final 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"));
assertAtPath
in interface IAwsApiCall
assertAtPath
in interface IAwsApiCall.Jsii$Default
path
- This parameter is required.expected
- This parameter is required.public final 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")));
expect
in interface IAwsApiCall
expect
in interface IAwsApiCall.Jsii$Default
expected
- This parameter is required.public final 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.
getAtt
in interface IAwsApiCall
getAtt
in interface IAwsApiCall.Jsii$Default
attributeName
- the name of the attribute. This parameter is required.public final 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.
getAttString
in interface IAwsApiCall
getAttString
in interface IAwsApiCall.Jsii$Default
attributeName
- the name of the attribute. This parameter is required.