Class TriggerProps
Props for Trigger
.
Inheritance
Namespace: Amazon.CDK.Triggers
Assembly: Amazon.CDK.Triggers.dll
Syntax (csharp)
public class TriggerProps : Object, ITriggerProps, ITriggerOptions
Syntax (vb)
Public Class TriggerProps
Inherits Object
Implements ITriggerProps, ITriggerOptions
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 triggerProps = new TriggerProps {
Handler = function_,
// the properties below are optional
ExecuteAfter = new [] { construct },
ExecuteBefore = new [] { construct },
ExecuteOnHandlerChange = false
};
Synopsis
Constructors
TriggerProps() |
Properties
ExecuteAfter | Adds trigger dependencies. Execute this trigger only after these construct scopes have been provisioned. |
ExecuteBefore | Adds this trigger as a dependency on other constructs. |
ExecuteOnHandlerChange | Re-executes the trigger every time the handler changes. |
Handler | The AWS Lambda function of the handler to execute. |
Constructors
TriggerProps()
public TriggerProps()
Properties
ExecuteAfter
Adds trigger dependencies. Execute this trigger only after these construct scopes have been provisioned.
public Construct[] ExecuteAfter { get; set; }
Property Value
Constructs.Construct[]
Remarks
You can also use trigger.executeAfter()
to add additional dependencies.
Default: []
ExecuteBefore
Adds this trigger as a dependency on other constructs.
public Construct[] ExecuteBefore { get; set; }
Property Value
Constructs.Construct[]
Remarks
This means that this trigger will get executed before the given construct(s).
You can also use trigger.executeBefore()
to add additional dependants.
Default: []
ExecuteOnHandlerChange
Re-executes the trigger every time the handler changes.
public Nullable<bool> ExecuteOnHandlerChange { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
This implies that the trigger is associated with the currentVersion
of
the handler, which gets recreated every time the handler or its
configuration is updated.
Default: true
Handler
The AWS Lambda function of the handler to execute.
public Function Handler { get; set; }
Property Value