interface TriggerOptions
Language | Type name |
---|---|
.NET | Amazon.CDK.Triggers.TriggerOptions |
Go | github.com/aws/aws-cdk-go/awscdk/v2/triggers#TriggerOptions |
Java | software.amazon.awscdk.triggers.TriggerOptions |
Python | aws_cdk.triggers.TriggerOptions |
TypeScript (source) | aws-cdk-lib » triggers » TriggerOptions |
Options for Trigger
.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { triggers } from 'aws-cdk-lib';
import * as constructs from 'constructs';
declare const construct: constructs.Construct;
const triggerOptions: triggers.TriggerOptions = {
executeAfter: [construct],
executeBefore: [construct],
executeOnHandlerChange: false,
};
Properties
Name | Type | Description |
---|---|---|
execute | Construct [] | Adds trigger dependencies. Execute this trigger only after these construct scopes have been provisioned. |
execute | Construct [] | Adds this trigger as a dependency on other constructs. |
execute | boolean | Re-executes the trigger every time the handler changes. |
executeAfter?
Type:
Construct
[]
(optional, default: [])
Adds trigger dependencies. Execute this trigger only after these construct scopes have been provisioned.
You can also use trigger.executeAfter()
to add additional dependencies.
executeBefore?
Type:
Construct
[]
(optional, default: [])
Adds this trigger as a dependency on other constructs.
This means that this trigger will get executed before the given construct(s).
You can also use trigger.executeBefore()
to add additional dependants.
executeOnHandlerChange?
Type:
boolean
(optional, default: true)
Re-executes the trigger every time the handler changes.
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.