TriggerOptions

class aws_cdk.triggers.TriggerOptions(*, execute_after=None, execute_before=None, execute_on_handler_change=None)

Bases: object

Options for Trigger.

Parameters:
  • execute_after (Optional[Sequence[Construct]]) – Adds trigger dependencies. Execute this trigger only after these construct scopes have been provisioned. You can also use trigger.executeAfter() to add additional dependencies. Default: []

  • execute_before (Optional[Sequence[Construct]]) – 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. Default: []

  • execute_on_handler_change (Optional[bool]) – 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. Default: true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.triggers as triggers
import constructs as constructs

# construct: constructs.Construct

trigger_options = triggers.TriggerOptions(
    execute_after=[construct],
    execute_before=[construct],
    execute_on_handler_change=False
)

Attributes

execute_after

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

You can also use trigger.executeAfter() to add additional dependencies.

Default:

[]

execute_before

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.

Default:

[]

execute_on_handler_change

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.

Default:

true