Class TriggerProps.Builder

java.lang.Object
software.amazon.awscdk.triggers.TriggerProps.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<TriggerProps>
Enclosing interface:
TriggerProps

@Stability(Stable) public static final class TriggerProps.Builder extends Object implements software.amazon.jsii.Builder<TriggerProps>
A builder for TriggerProps
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • handler

      @Stability(Stable) public TriggerProps.Builder handler(Function handler)
      Sets the value of TriggerProps.getHandler()
      Parameters:
      handler - The AWS Lambda function of the handler to execute. This parameter is required.
      Returns:
      this
    • invocationType

      @Stability(Stable) public TriggerProps.Builder invocationType(InvocationType invocationType)
      Parameters:
      invocationType - The invocation type to invoke the Lambda function with.
      Returns:
      this
    • timeout

      @Stability(Stable) public TriggerProps.Builder timeout(Duration timeout)
      Sets the value of TriggerProps.getTimeout()
      Parameters:
      timeout - The timeout of the invocation call of the Lambda function to be triggered.
      Returns:
      this
    • executeAfter

      @Stability(Stable) public TriggerProps.Builder executeAfter(List<? extends software.constructs.Construct> executeAfter)
      Parameters:
      executeAfter - Adds trigger dependencies. Execute this trigger only after these construct scopes have been provisioned. You can also use trigger.executeAfter() to add additional dependencies.
      Returns:
      this
    • executeBefore

      @Stability(Stable) public TriggerProps.Builder executeBefore(List<? extends software.constructs.Construct> executeBefore)
      Parameters:
      executeBefore - Adds this trigger as a dependency on other constructs. This means that this trigger will get executed before the given construct(s).

      You can also use trigger.executeBefore() to add additional dependants.

      Returns:
      this
    • executeOnHandlerChange

      @Stability(Stable) public TriggerProps.Builder executeOnHandlerChange(Boolean executeOnHandlerChange)
      Parameters:
      executeOnHandlerChange - Re-executes the trigger every time the handler changes. This implies that the trigger is associated with the currentVersion of the handler, which gets recreated every time the handler or its configuration is updated.
      Returns:
      this
    • build

      @Stability(Stable) public TriggerProps build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<TriggerProps>
      Returns:
      a new instance of TriggerProps
      Throws:
      NullPointerException - if any required attribute was not provided