Interface TriggerProps

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

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-08T21:35:15.330Z") @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