Interface TriggerProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable, TriggerOptions
All Known Implementing Classes:
TriggerProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-10-31T19:13:07.495Z") @Stability(Stable) public interface TriggerProps extends software.amazon.jsii.JsiiSerializable, TriggerOptions
Props for Trigger.

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();
 
  • Method Details

    • getHandler

      @Stability(Stable) @NotNull Function getHandler()
      The AWS Lambda function of the handler to execute.
    • getInvocationType

      @Stability(Stable) @Nullable default InvocationType getInvocationType()
      The invocation type to invoke the Lambda function with.

      Default: RequestResponse

    • getTimeout

      @Stability(Stable) @Nullable default Duration getTimeout()
      The timeout of the invocation call of the Lambda function to be triggered.

      Default: Duration.minutes(2)

    • builder

      @Stability(Stable) static TriggerProps.Builder builder()
      Returns:
      a TriggerProps.Builder of TriggerProps