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
,ITrigger
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-12-06T14:43:28.804Z")
@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 classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.ec2.IClientVpnConnectionHandler
IClientVpnConnectionHandler.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.lambda.IFunction
IFunction.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.triggers.ITrigger
ITrigger.Jsii$Default, ITrigger.Jsii$Proxy
-
Constructor Summary
ModifierConstructorDescriptionprotected
TriggerFunction
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
TriggerFunction
(software.amazon.jsii.JsiiObjectRef objRef) TriggerFunction
(software.constructs.Construct scope, String id, TriggerFunctionProps 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.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, metricAllUnreservedConcurrentExecutions
Methods inherited from class software.amazon.awscdk.services.lambda.FunctionBase
addEventSource, addEventSourceMapping, addFunctionUrl, addFunctionUrl, addPermission, addToRolePolicy, configureAsyncInvoke, considerWarningOnInvokeFunctionPermissions, getConnections, getIsBoundToVpc, getLatestVersion, grantInvoke, grantInvokeCompositePrincipal, grantInvokeLatestVersion, grantInvokeUrl, grantInvokeVersion, metric, metric, metricDuration, metricDuration, metricErrors, metricErrors, metricInvocations, metricInvocations, metricThrottles, metricThrottles, warnInvokeFunctionPermissions
Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResource
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.awscdk.IResource
applyRemovalPolicy, getEnv, getStack
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
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 @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.
-
getTrigger
The underlying trigger resource.
-