Package software.amazon.awscdk.triggers
Class Trigger
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.triggers.Trigger
- All Implemented Interfaces:
IConstruct
,IDependable
,ITrigger
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:41.470Z")
@Stability(Stable)
public class Trigger
extends Construct
implements ITrigger
Triggers an AWS Lambda function during deployment.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.lambda.*; import software.amazon.awscdk.triggers.*; import software.constructs.*; Construct construct; Function function_; Trigger trigger = Trigger.Builder.create(this, "MyTrigger") .handler(function_) // the properties below are optional .executeAfter(List.of(construct)) .executeBefore(List.of(construct)) .executeOnHandlerChange(false) .build();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default, IConstruct.Jsii$Proxy
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.triggers.ITrigger
ITrigger.Jsii$Default, ITrigger.Jsii$Proxy
-
Constructor Summary
ModifierConstructorDescriptionprotected
Trigger
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
Trigger
(software.amazon.jsii.JsiiObjectRef objRef) Trigger
(software.constructs.Construct scope, String id, TriggerProps props) -
Method Summary
Modifier and TypeMethodDescriptionvoid
executeAfter
(@NotNull software.constructs.Construct... scopes) Adds trigger dependencies.void
executeBefore
(@NotNull software.constructs.Construct... scopes) Adds this trigger as a dependency on other constructs.Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.constructs.Construct
toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.awscdk.core.IConstruct
getNode
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
Trigger
protected Trigger(software.amazon.jsii.JsiiObjectRef objRef) -
Trigger
protected Trigger(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
Trigger
@Stability(Stable) public Trigger(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull TriggerProps props) - Parameters:
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.
-
-
Method Details
-
executeAfter
@Stability(Stable) public void executeAfter(@NotNull @NotNull software.constructs.Construct... scopes) Adds trigger dependencies.Execute this trigger only after these construct scopes have been provisioned.
- Specified by:
executeAfter
in interfaceITrigger
- Parameters:
scopes
- This parameter is required.
-
executeBefore
@Stability(Stable) public void executeBefore(@NotNull @NotNull software.constructs.Construct... scopes) Adds this trigger as a dependency on other constructs.This means that this trigger will get executed before the given construct(s).
- Specified by:
executeBefore
in interfaceITrigger
- Parameters:
scopes
- This parameter is required.
-