Package software.amazon.awscdk.triggers
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.executeAfter
(List<? extends software.constructs.Construct> executeAfter) Sets the value ofTriggerOptions.getExecuteAfter()
executeBefore
(List<? extends software.constructs.Construct> executeBefore) Sets the value ofTriggerOptions.getExecuteBefore()
executeOnHandlerChange
(Boolean executeOnHandlerChange) Sets the value ofTriggerOptions.getExecuteOnHandlerChange()
Sets the value ofTriggerProps.getHandler()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
handler
Sets the value ofTriggerProps.getHandler()
- Parameters:
handler
- The AWS Lambda function of the handler to execute. This parameter is required.- Returns:
this
-
executeAfter
@Stability(Stable) public TriggerProps.Builder executeAfter(List<? extends software.constructs.Construct> executeAfter) Sets the value ofTriggerOptions.getExecuteAfter()
- Parameters:
executeAfter
- Adds trigger dependencies. Execute this trigger only after these construct scopes have been provisioned. You can also usetrigger.executeAfter()
to add additional dependencies.- Returns:
this
-
executeBefore
@Stability(Stable) public TriggerProps.Builder executeBefore(List<? extends software.constructs.Construct> executeBefore) Sets the value ofTriggerOptions.getExecuteBefore()
- 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) Sets the value ofTriggerOptions.getExecuteOnHandlerChange()
- Parameters:
executeOnHandlerChange
- Re-executes the trigger every time the handler changes. This implies that the trigger is associated with thecurrentVersion
of the handler, which gets recreated every time the handler or its configuration is updated.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<TriggerProps>
- Returns:
- a new instance of
TriggerProps
- Throws:
NullPointerException
- if any required attribute was not provided
-