Class TriggerFunction

java.lang.Object
software.amazon.jsii.JsiiObject
All Implemented Interfaces:
IResource, IClientVpnConnectionHandler, IConnectable, IGrantable, IFunction, ITrigger, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-02T15:58:34.995Z") @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();
 
  • 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 interface ITrigger
      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 interface ITrigger
      Parameters:
      scopes - This parameter is required.
    • getTrigger

      @Stability(Stable) @NotNull public Trigger getTrigger()
      The underlying trigger resource.