Package software.amazon.awscdk.triggers
Class Trigger
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.triggers.Trigger
- All Implemented Interfaces:
ITrigger,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-24T13:34:49.359Z")
@Stability(Stable)
public class Trigger
extends software.constructs.Construct
implements ITrigger
Triggers an AWS Lambda function during deployment.
Example:
import software.amazon.awscdk.triggers.*;
Function func = Function.Builder.create(this, "MyFunction")
.handler("index.handler")
.runtime(Runtime.NODEJS_18_X)
.code(Code.fromInline("foo"))
.build();
Trigger.Builder.create(this, "MyTrigger")
.handler(func)
.timeout(Duration.minutes(10))
.invocationType(InvocationType.EVENT)
.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.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(software.constructs.Construct... scopes) Adds trigger dependencies.voidexecuteBefore(software.constructs.Construct... scopes) Adds this trigger as a dependency on other constructs.Methods inherited from class software.constructs.Construct
getNode, isConstruct, 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.constructs.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 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 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.
-