Package software.amazon.awscdk.triggers
Class TriggerFunction
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.core.Resource
software.amazon.awscdk.services.lambda.FunctionBase
software.amazon.awscdk.services.lambda.Function
software.amazon.awscdk.triggers.TriggerFunction
- All Implemented Interfaces:
IConstruct
,IDependable
,IResource
,IClientVpnConnectionHandler
,IConnectable
,IGrantable
,IFunction
,ITrigger
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:41.471Z")
@Stability(Stable)
public class TriggerFunction
extends Function
implements ITrigger
Invokes an AWS Lambda function during deployment.
Example:
import software.amazon.awscdk.services.lambda.*; import software.amazon.awscdk.triggers.*; import software.amazon.awscdk.core.Stack; Stack stack; TriggerFunction.Builder.create(stack, "MyTrigger") .runtime(Runtime.NODEJS_14_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.amazon.awscdk.core.IConstruct
IConstruct.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.core.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, addVersion, addVersion, addVersion, addVersion, addVersion, classifyVersionProperty, fromFunctionArn, fromFunctionAttributes, fromFunctionName, getArchitecture, getCanCreatePermissions, getCurrentVersion, getDeadLetterQueue, getDeadLetterTopic, getFunctionArn, getFunctionName, getGrantPrincipal, getLogGroup, getPermissionsNode, getResourceArnsForGrantInvoke, getRole, getRuntime, getTimeout, 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, grantInvokeUrl, metric, metric, metricDuration, metricDuration, metricErrors, metricErrors, metricInvocations, metricInvocations, metricThrottles, metricThrottles, warnInvokeFunctionPermissions
Methods inherited from class software.amazon.awscdk.core.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResource
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.constructs.Construct
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.amazon.awscdk.core.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.core.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.
-