Package software.amazon.awscdk.triggers
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 Summary
Modifier and TypeMethodDescriptionbuild()
static Trigger.Builder
executeAfter
(List<? extends software.constructs.Construct> executeAfter) Adds trigger dependencies.executeBefore
(List<? extends software.constructs.Construct> executeBefore) Adds this trigger as a dependency on other constructs.executeOnHandlerChange
(Boolean executeOnHandlerChange) Re-executes the trigger every time the handler changes.The AWS Lambda function of the handler to execute.invocationType
(InvocationType invocationType) The invocation type to invoke the Lambda function with.The timeout of the invocation call of the Lambda function to be triggered.
-
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
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
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
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
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
-