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 ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default, IConstruct.Jsii$ProxyNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.triggers.ITrigger
ITrigger.Jsii$Default, ITrigger.Jsii$Proxy -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTrigger(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedTrigger(software.amazon.jsii.JsiiObjectRef objRef) Trigger(software.constructs.Construct scope, String id, TriggerProps props) -
Method Summary
Modifier and TypeMethodDescriptionvoidexecuteAfter(@NotNull software.constructs.Construct... scopes) Adds trigger dependencies.voidexecuteBefore(@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, validateMethods inherited from class software.constructs.Construct
toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.awscdk.core.IConstruct
getNodeMethods 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:
executeAfterin 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:
executeBeforein interfaceITrigger- Parameters:
scopes- This parameter is required.
-