@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-07T23:47:16.046Z") @Stability(value=Experimental) public enum InvocationType extends Enum<InvocationType>
Default is REQUEST_RESPONE
Example:
App app;
Stack stack;
Queue queue;
IFunction fn;
IntegTest integ = IntegTest.Builder.create(app, "Integ")
.testCases(List.of(stack))
.build();
integ.assertions.invokeFunction(LambdaInvokeFunctionProps.builder()
.functionName(fn.getFunctionName())
.invocationType(InvocationType.EVENT)
.payload(JSON.stringify(Map.of("status", "OK")))
.build());
IAwsApiCall message = integ.assertions.awsApiCall("SQS", "receiveMessage", Map.of(
"QueueUrl", queue.getQueueUrl(),
"WaitTimeSeconds", 20));
message.assertAtPath("Messages.0.Body", ExpectedResult.objectLike(Map.of(
"requestContext", Map.of(
"condition", "Success"),
"requestPayload", Map.of(
"status", "OK"),
"responseContext", Map.of(
"statusCode", 200),
"responsePayload", "success")));
| Enum Constant and Description |
|---|
DRY_RUN
(experimental) Validate parameter values and verify that the user or role has permission to invoke the function.
|
EVENT
(experimental) Invoke the function asynchronously.
|
REQUEST_RESPONE
(experimental) Invoke the function synchronously.
|
| Modifier and Type | Method and Description |
|---|---|
static InvocationType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static InvocationType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
@Stability(value=Experimental) public static final InvocationType EVENT
Send events that fail multiple times to the function's dead-letter queue (if it's configured). The API response only includes a status code.
@Stability(value=Experimental) public static final InvocationType REQUEST_RESPONE
Keep the connection open until the function returns a response or times out. The API response includes the function response and additional data.
@Stability(value=Experimental) public static final InvocationType DRY_RUN
public static InvocationType[] values()
for (InvocationType c : InvocationType.values()) System.out.println(c);
public static InvocationType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2022. All rights reserved.