Class Trigger.Builder

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

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

    • create

      @Stability(Stable) public static Trigger.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of Trigger.Builder.
    • executeAfter

      @Stability(Stable) public Trigger.Builder executeAfter(List<? extends software.constructs.Construct> 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.

      Default: []

      Parameters:
      executeAfter - Adds trigger dependencies. Execute this trigger only after these construct scopes have been provisioned. This parameter is required.
      Returns:
      this
    • executeBefore

      @Stability(Stable) public Trigger.Builder executeBefore(List<? extends software.constructs.Construct> 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.

      Default: []

      Parameters:
      executeBefore - Adds this trigger as a dependency on other constructs. This parameter is required.
      Returns:
      this
    • executeOnHandlerChange

      @Stability(Stable) public Trigger.Builder executeOnHandlerChange(Boolean 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.

      Default: true

      Parameters:
      executeOnHandlerChange - Re-executes the trigger every time the handler changes. This parameter is required.
      Returns:
      this
    • handler

      @Stability(Stable) public Trigger.Builder handler(Function handler)
      The AWS Lambda function of the handler to execute.

      Parameters:
      handler - The AWS Lambda function of the handler to execute. This parameter is required.
      Returns:
      this
    • invocationType

      @Stability(Stable) public Trigger.Builder invocationType(InvocationType invocationType)
      The invocation type to invoke the Lambda function with.

      Default: RequestResponse

      Parameters:
      invocationType - The invocation type to invoke the Lambda function with. This parameter is required.
      Returns:
      this
    • timeout

      @Stability(Stable) public Trigger.Builder timeout(Duration timeout)
      The timeout of the invocation call of the Lambda function to be triggered.

      Default: Duration.minutes(2)

      Parameters:
      timeout - The timeout of the invocation call of the Lambda function to be triggered. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public Trigger build()
      Specified by:
      build in interface software.amazon.jsii.Builder<Trigger>
      Returns:
      a newly built instance of Trigger.