Enum InvocationType

java.lang.Object
java.lang.Enum<InvocationType>
software.amazon.awscdk.triggers.InvocationType
All Implemented Interfaces:
Serializable, Comparable<InvocationType>, java.lang.constant.Constable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-22T22:42:59.754Z") @Stability(Stable) public enum InvocationType extends Enum<InvocationType>
The invocation type to apply to a trigger.

This determines whether the trigger function should await the result of the to be triggered function or not.

Example:

 import software.amazon.awscdk.triggers.*;
 Function func = Function.Builder.create(this, "MyFunction")
         .handler("index.handler")
         .runtime(Runtime.NODEJS_18_X)
         .code(Code.fromInline("foo"))
         .build();
 Trigger.Builder.create(this, "MyTrigger")
         .handler(func)
         .timeout(Duration.minutes(10))
         .invocationType(InvocationType.EVENT)
         .build();
 
  • Enum Constant Details

    • EVENT

      @Stability(Stable) public static final InvocationType EVENT
      Invoke the function asynchronously.

      Send events that fail multiple times to the function's dead-letter queue (if one is configured). The API response only includes a status code.

    • REQUEST_RESPONSE

      @Stability(Stable) public static final InvocationType REQUEST_RESPONSE
      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

      @Stability(Stable) public static final InvocationType DRY_RUN
      Validate parameter values and verify that the user or role has permission to invoke the function.
  • Method Details

    • values

      public static InvocationType[] 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

      public static InvocationType valueOf(String name)
      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 name
      NullPointerException - if the argument is null