OnDemandTriggerOptions

class aws_cdk.aws_glue.OnDemandTriggerOptions(*, actions, description=None, name=None)

Bases: TriggerOptions

Properties for configuring an on-demand Glue Trigger.

Parameters:
  • actions (Sequence[Action]) – The actions initiated by this trigger.

  • description (Optional[str]) – A description for the trigger. Default: - no description

  • name (Optional[str]) – A name for the trigger. Default: - no name is provided

ExampleMetadata:

infused

Example:

import aws_cdk as cdk
import aws_cdk.aws_iam as iam
# stack: cdk.Stack
# role: iam.IRole
# script: glue.Code


# Create a job to run from the workflow
job = glue.PySparkEtlJob(stack, "Job", role=role, script=script)

# Create a workflow and add a trigger that runs the job
workflow = glue.Workflow(stack, "Workflow")
workflow.add_on_demand_trigger("OnDemandTrigger",
    actions=[glue.Action.job(job)]
)

Attributes

actions

The actions initiated by this trigger.

description

A description for the trigger.

Default:
  • no description

name

A name for the trigger.

Default:
  • no name is provided