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.103.1 (build bef2dea)",
date="2024-10-25T14:21:25.407Z")
@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 classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
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.constructs.Construct
getNode, isConstruct, 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.constructs.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.
-