CfnTriggerPropsMixin

class aws_cdk.mixins_preview.aws_glue.mixins.CfnTriggerPropsMixin(props, *, strategy=None)

Bases: Mixin

The AWS::Glue::Trigger resource specifies triggers that run AWS Glue jobs.

For more information, see Triggering Jobs in AWS Glue and Trigger Structure in the AWS Glue Developer Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-trigger.html

CloudformationResource:

AWS::Glue::Trigger

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_glue import mixins as glue_mixins

# arguments_: Any
# tags: Any

cfn_trigger_props_mixin = glue_mixins.CfnTriggerPropsMixin(glue_mixins.CfnTriggerMixinProps(
    actions=[glue_mixins.CfnTriggerPropsMixin.ActionProperty(
        arguments=arguments_,
        crawler_name="crawlerName",
        job_name="jobName",
        notification_property=glue_mixins.CfnTriggerPropsMixin.NotificationPropertyProperty(
            notify_delay_after=123
        ),
        security_configuration="securityConfiguration",
        timeout=123
    )],
    description="description",
    event_batching_condition=glue_mixins.CfnTriggerPropsMixin.EventBatchingConditionProperty(
        batch_size=123,
        batch_window=123
    ),
    name="name",
    predicate=glue_mixins.CfnTriggerPropsMixin.PredicateProperty(
        conditions=[glue_mixins.CfnTriggerPropsMixin.ConditionProperty(
            crawler_name="crawlerName",
            crawl_state="crawlState",
            job_name="jobName",
            logical_operator="logicalOperator",
            state="state"
        )],
        logical="logical"
    ),
    schedule="schedule",
    start_on_creation=False,
    tags=tags,
    type="type",
    workflow_name="workflowName"
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::Glue::Trigger.

Parameters:
  • props (Union[CfnTriggerMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['actions', 'description', 'eventBatchingCondition', 'name', 'predicate', 'schedule', 'startOnCreation', 'tags', 'type', 'workflowName']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

ActionProperty

class CfnTriggerPropsMixin.ActionProperty(*, arguments=None, crawler_name=None, job_name=None, notification_property=None, security_configuration=None, timeout=None)

Bases: object

Defines an action to be initiated by a trigger.

Parameters:
  • arguments (Any) – The job arguments used when this trigger fires. For this job run, they replace the default arguments set in the job definition itself. You can specify arguments here that your own job-execution script consumes, in addition to arguments that AWS Glue itself consumes. For information about how to specify and consume your own job arguments, see Calling AWS Glue APIs in Python in the AWS Glue Developer Guide . For information about the key-value pairs that AWS Glue consumes to set up your job, see the Special Parameters Used by AWS Glue topic in the developer guide.

  • crawler_name (Optional[str]) – The name of the crawler to be used with this action.

  • job_name (Optional[str]) – The name of a job to be executed.

  • notification_property (Union[IResolvable, NotificationPropertyProperty, Dict[str, Any], None]) – Specifies configuration properties of a job run notification.

  • security_configuration (Optional[str]) – The name of the SecurityConfiguration structure to be used with this action.

  • timeout (Union[int, float, None]) – The JobRun timeout in minutes. This is the maximum time that a job run can consume resources before it is terminated and enters TIMEOUT status. The default is 2,880 minutes (48 hours). This overrides the timeout value set in the parent job.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-trigger-action.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_glue import mixins as glue_mixins

# arguments_: Any

action_property = glue_mixins.CfnTriggerPropsMixin.ActionProperty(
    arguments=arguments_,
    crawler_name="crawlerName",
    job_name="jobName",
    notification_property=glue_mixins.CfnTriggerPropsMixin.NotificationPropertyProperty(
        notify_delay_after=123
    ),
    security_configuration="securityConfiguration",
    timeout=123
)

Attributes

arguments

The job arguments used when this trigger fires.

For this job run, they replace the default arguments set in the job definition itself.

You can specify arguments here that your own job-execution script consumes, in addition to arguments that AWS Glue itself consumes.

For information about how to specify and consume your own job arguments, see Calling AWS Glue APIs in Python in the AWS Glue Developer Guide .

For information about the key-value pairs that AWS Glue consumes to set up your job, see the Special Parameters Used by AWS Glue topic in the developer guide.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-trigger-action.html#cfn-glue-trigger-action-arguments

crawler_name

The name of the crawler to be used with this action.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-trigger-action.html#cfn-glue-trigger-action-crawlername

job_name

The name of a job to be executed.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-trigger-action.html#cfn-glue-trigger-action-jobname

notification_property

Specifies configuration properties of a job run notification.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-trigger-action.html#cfn-glue-trigger-action-notificationproperty

security_configuration

The name of the SecurityConfiguration structure to be used with this action.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-trigger-action.html#cfn-glue-trigger-action-securityconfiguration

timeout

The JobRun timeout in minutes.

This is the maximum time that a job run can consume resources before it is terminated and enters TIMEOUT status. The default is 2,880 minutes (48 hours). This overrides the timeout value set in the parent job.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-trigger-action.html#cfn-glue-trigger-action-timeout

ConditionProperty

class CfnTriggerPropsMixin.ConditionProperty(*, crawler_name=None, crawl_state=None, job_name=None, logical_operator=None, state=None)

Bases: object

Defines a condition under which a trigger fires.

Parameters:
  • crawler_name (Optional[str]) – The name of the crawler to which this condition applies.

  • crawl_state (Optional[str]) – The state of the crawler to which this condition applies.

  • job_name (Optional[str]) – The name of the job whose JobRuns this condition applies to, and on which this trigger waits.

  • logical_operator (Optional[str]) – A logical operator.

  • state (Optional[str]) – The condition state. Currently, the values supported are SUCCEEDED , STOPPED , TIMEOUT , and FAILED .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-trigger-condition.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_glue import mixins as glue_mixins

condition_property = glue_mixins.CfnTriggerPropsMixin.ConditionProperty(
    crawler_name="crawlerName",
    crawl_state="crawlState",
    job_name="jobName",
    logical_operator="logicalOperator",
    state="state"
)

Attributes

crawl_state

The state of the crawler to which this condition applies.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-trigger-condition.html#cfn-glue-trigger-condition-crawlstate

crawler_name

The name of the crawler to which this condition applies.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-trigger-condition.html#cfn-glue-trigger-condition-crawlername

job_name

The name of the job whose JobRuns this condition applies to, and on which this trigger waits.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-trigger-condition.html#cfn-glue-trigger-condition-jobname

logical_operator

A logical operator.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-trigger-condition.html#cfn-glue-trigger-condition-logicaloperator

state

The condition state.

Currently, the values supported are SUCCEEDED , STOPPED , TIMEOUT , and FAILED .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-trigger-condition.html#cfn-glue-trigger-condition-state

EventBatchingConditionProperty

class CfnTriggerPropsMixin.EventBatchingConditionProperty(*, batch_size=None, batch_window=None)

Bases: object

Batch condition that must be met (specified number of events received or batch time window expired) before EventBridge event trigger fires.

Parameters:
  • batch_size (Union[int, float, None]) – Number of events that must be received from Amazon EventBridge before EventBridge event trigger fires.

  • batch_window (Union[int, float, None]) – Window of time in seconds after which EventBridge event trigger fires. Window starts when first event is received.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-trigger-eventbatchingcondition.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_glue import mixins as glue_mixins

event_batching_condition_property = glue_mixins.CfnTriggerPropsMixin.EventBatchingConditionProperty(
    batch_size=123,
    batch_window=123
)

Attributes

batch_size

Number of events that must be received from Amazon EventBridge before EventBridge event trigger fires.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-trigger-eventbatchingcondition.html#cfn-glue-trigger-eventbatchingcondition-batchsize

batch_window

Window of time in seconds after which EventBridge event trigger fires.

Window starts when first event is received.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-trigger-eventbatchingcondition.html#cfn-glue-trigger-eventbatchingcondition-batchwindow

NotificationPropertyProperty

class CfnTriggerPropsMixin.NotificationPropertyProperty(*, notify_delay_after=None)

Bases: object

Specifies configuration properties of a job run notification.

Parameters:

notify_delay_after (Union[int, float, None]) – After a job run starts, the number of minutes to wait before sending a job run delay notification.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-trigger-notificationproperty.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_glue import mixins as glue_mixins

notification_property_property = glue_mixins.CfnTriggerPropsMixin.NotificationPropertyProperty(
    notify_delay_after=123
)

Attributes

notify_delay_after

After a job run starts, the number of minutes to wait before sending a job run delay notification.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-trigger-notificationproperty.html#cfn-glue-trigger-notificationproperty-notifydelayafter

PredicateProperty

class CfnTriggerPropsMixin.PredicateProperty(*, conditions=None, logical=None)

Bases: object

Defines the predicate of the trigger, which determines when it fires.

Parameters:
  • conditions (Union[IResolvable, Sequence[Union[IResolvable, ConditionProperty, Dict[str, Any]]], None]) – A list of the conditions that determine when the trigger will fire.

  • logical (Optional[str]) – An optional field if only one condition is listed. If multiple conditions are listed, then this field is required.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-trigger-predicate.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_glue import mixins as glue_mixins

predicate_property = glue_mixins.CfnTriggerPropsMixin.PredicateProperty(
    conditions=[glue_mixins.CfnTriggerPropsMixin.ConditionProperty(
        crawler_name="crawlerName",
        crawl_state="crawlState",
        job_name="jobName",
        logical_operator="logicalOperator",
        state="state"
    )],
    logical="logical"
)

Attributes

conditions

A list of the conditions that determine when the trigger will fire.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-trigger-predicate.html#cfn-glue-trigger-predicate-conditions

logical

An optional field if only one condition is listed.

If multiple conditions are listed, then this field is required.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-trigger-predicate.html#cfn-glue-trigger-predicate-logical