Enum InvocationType
- All Implemented Interfaces:
Serializable
,Comparable<InvocationType>
,java.lang.constant.Constable
@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)",
date="2023-05-31T18:44:08.437Z")
@Stability(Experimental)
public enum InvocationType
extends Enum<InvocationType>
(experimental) The type of invocation.
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")));
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescription(experimental) Validate parameter values and verify that the user or role has permission to invoke the function.(experimental) Invoke the function asynchronously.(experimental) Invoke the function synchronously. -
Method Summary
Modifier and TypeMethodDescriptionstatic InvocationType
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.
-
Enum Constant Details
-
EVENT
(experimental) Invoke the function asynchronously.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.
-
REQUEST_RESPONE
(experimental) Invoke the function synchronously.Keep the connection open until the function returns a response or times out. The API response includes the function response and additional data.
-
DRY_RUN
(experimental) Validate parameter values and verify that the user or role has permission to invoke the function.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-