Show / Hide Table of Contents

Class TriggerProps

Props for Trigger.

Inheritance
object
TriggerProps
Implements
ITriggerProps
ITriggerOptions
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.Triggers
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class TriggerProps : ITriggerProps, ITriggerOptions
Syntax (vb)
Public Class TriggerProps Implements ITriggerProps, ITriggerOptions
Remarks

ExampleMetadata: infused

Examples
using Amazon.CDK.Triggers;


            var func = new Function(this, "MyFunction", new FunctionProps {
                Handler = "index.handler",
                Runtime = Runtime.NODEJS_LATEST,
                Code = Code.FromInline("foo")
            });

            new Trigger(this, "MyTrigger", new TriggerProps {
                Handler = func,
                Timeout = Duration.Minutes(10),
                InvocationType = InvocationType.EVENT
            });

Synopsis

Constructors

TriggerProps()

Props for Trigger.

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.

InvocationType

The invocation type to invoke the Lambda function with.

Timeout

The timeout of the invocation call of the Lambda function to be triggered.

Constructors

TriggerProps()

Props for Trigger.

public TriggerProps()
Remarks

ExampleMetadata: infused

Examples
using Amazon.CDK.Triggers;


            var func = new Function(this, "MyFunction", new FunctionProps {
                Handler = "index.handler",
                Runtime = Runtime.NODEJS_LATEST,
                Code = Code.FromInline("foo")
            });

            new Trigger(this, "MyTrigger", new TriggerProps {
                Handler = func,
                Timeout = Duration.Minutes(10),
                InvocationType = InvocationType.EVENT
            });

Properties

ExecuteAfter

Adds trigger dependencies. Execute this trigger only after these construct scopes have been provisioned.

public Construct[]? ExecuteAfter { get; set; }
Property Value

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

Construct[]

Remarks

This means that this trigger will get executed before the given construct(s).

You can also use trigger.executeBefore() to add additional dependents.

Default: []

ExecuteOnHandlerChange

Re-executes the trigger every time the handler changes.

public bool? ExecuteOnHandlerChange { get; set; }
Property Value

bool?

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

Function

Remarks

ExampleMetadata: infused

InvocationType

The invocation type to invoke the Lambda function with.

public InvocationType? InvocationType { get; set; }
Property Value

InvocationType?

Remarks

Default: RequestResponse

Timeout

The timeout of the invocation call of the Lambda function to be triggered.

public Duration? Timeout { get; set; }
Property Value

Duration

Remarks

Default: Duration.minutes(2)

Implements

ITriggerProps
ITriggerOptions
Back to top Generated by DocFX