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 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.amazon.awscdk.core.IConstruct
IConstruct.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.core.IResource
IResource.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.triggers.ITrigger
ITrigger.Jsii$Default, ITrigger.Jsii$Proxy -
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(@NotNull software.constructs.Construct... scopes) Adds trigger dependencies.voidexecuteBefore(@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, metricAllUnreservedConcurrentExecutionsMethods 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, warnInvokeFunctionPermissionsMethods inherited from class software.amazon.awscdk.core.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResourceMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.constructs.Construct
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.core.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.core.IResource
applyRemovalPolicy, getEnv, getStackMethods 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:
executeAfterin 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:
executeBeforein interfaceITrigger- Parameters:
scopes- This parameter is required.
-
getTrigger
The underlying trigger resource.
-