Class Trigger
Triggers an AWS Lambda function during deployment.
Inherited Members
Namespace: Amazon.CDK.Triggers
Assembly: Amazon.CDK.Triggers.dll
Syntax (csharp)
public class Trigger : Construct, ITrigger, IConstruct, IDependable
Syntax (vb)
Public Class Trigger
Inherits Construct
Implements ITrigger, IConstruct, IDependable
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Lambda;
using Amazon.CDK.Triggers;
using Constructs;
Construct construct;
Function function_;
var trigger = new Trigger(this, "MyTrigger", new TriggerProps {
Handler = function_,
// the properties below are optional
ExecuteAfter = new [] { construct },
ExecuteBefore = new [] { construct },
ExecuteOnHandlerChange = false
});
Synopsis
Constructors
Trigger(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Trigger(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Trigger(Construct, String, ITriggerProps) |
Methods
ExecuteAfter(Construct[]) | Adds trigger dependencies. |
ExecuteBefore(Construct[]) | Adds this trigger as a dependency on other constructs. |
Constructors
Trigger(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected Trigger(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
Trigger(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected Trigger(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Trigger(Construct, String, ITriggerProps)
public Trigger(Construct scope, string id, ITriggerProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props ITriggerProps
Methods
ExecuteAfter(Construct[])
Adds trigger dependencies.
public virtual void ExecuteAfter(params Construct[] scopes)
Parameters
- scopes Constructs.Construct[]
Remarks
Execute this trigger only after these construct scopes have been provisioned.
ExecuteBefore(Construct[])
Adds this trigger as a dependency on other constructs.
public virtual void ExecuteBefore(params Construct[] scopes)
Parameters
- scopes Constructs.Construct[]
Remarks
This means that this trigger will get executed before the given construct(s).