Package software.amazon.awscdk.triggers
Class TriggerFunction
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.lambda.FunctionBase
software.amazon.awscdk.services.lambda.Function
software.amazon.awscdk.triggers.TriggerFunction
- All Implemented Interfaces:
IResource,IClientVpnConnectionHandler,IConnectable,IGrantable,IFunction,IFunctionRef,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 TriggerFunction
extends Function
implements ITrigger
Invokes an AWS Lambda function during deployment.
Example:
import software.amazon.awscdk.triggers.*;
TriggerFunction.Builder.create(this, "MyTrigger")
.runtime(Runtime.NODEJS_18_X)
.handler("index.handler")
.code(Code.fromAsset(__dirname + "/my-trigger"))
.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.services.ec2.IClientVpnConnectionHandler
IClientVpnConnectionHandler.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.lambda.IFunction
IFunction.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.triggers.ITrigger
ITrigger.Jsii$Default, ITrigger.Jsii$Proxy -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTriggerFunction(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedTriggerFunction(software.amazon.jsii.JsiiObjectRef objRef) TriggerFunction(software.constructs.Construct scope, String id, TriggerFunctionProps 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.The underlying trigger resource.Methods inherited from class software.amazon.awscdk.services.lambda.Function
addAlias, addAlias, addEnvironment, addEnvironment, addLayers, classifyVersionProperty, fromFunctionArn, fromFunctionAttributes, fromFunctionName, getArchitecture, getCanCreatePermissions, getCurrentVersion, getDeadLetterQueue, getDeadLetterTopic, getFunctionArn, getFunctionName, getGrantPrincipal, getLogGroup, getPermissionsNode, getResourceArnsForGrantInvoke, getRole, getRuntime, getTimeout, invalidateVersionBasedOn, metricAll, metricAll, metricAllConcurrentExecutions, metricAllConcurrentExecutions, metricAllDuration, metricAllDuration, metricAllErrors, metricAllErrors, metricAllInvocations, metricAllInvocations, metricAllThrottles, metricAllThrottles, metricAllUnreservedConcurrentExecutions, metricAllUnreservedConcurrentExecutionsMethods inherited from class software.amazon.awscdk.services.lambda.FunctionBase
addEventSource, addEventSourceMapping, addFunctionUrl, addFunctionUrl, addPermission, addToRolePolicy, configureAsyncInvoke, considerWarningOnInvokeFunctionPermissions, getConnections, getFunctionRef, getIsBoundToVpc, getLatestVersion, grantInvoke, grantInvokeCompositePrincipal, grantInvokeLatestVersion, grantInvokeUrl, grantInvokeVersion, metric, metric, metricDuration, metricDuration, metricErrors, metricErrors, metricInvocations, metricInvocations, metricThrottles, metricThrottles, warnInvokeFunctionPermissionsMethods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods 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.amazon.awscdk.IResource
applyRemovalPolicy, getEnv, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
Uniquely identifies this class.
-
-
Constructor Details
-
TriggerFunction
protected TriggerFunction(software.amazon.jsii.JsiiObjectRef objRef) -
TriggerFunction
protected TriggerFunction(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
TriggerFunction
@Stability(Stable) public TriggerFunction(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull TriggerFunctionProps 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.
-
getTrigger
The underlying trigger resource.
-