CfnTriggerPropsMixin
- class aws_cdk.mixins_preview.aws_glue.mixins.CfnTriggerPropsMixin(props, *, strategy=None)
Bases:
MixinThe
AWS::Glue::Triggerresource 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:
- 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
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
ActionProperty
- class CfnTriggerPropsMixin.ActionProperty(*, arguments=None, crawler_name=None, job_name=None, notification_property=None, security_configuration=None, timeout=None)
Bases:
objectDefines 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 theSecurityConfigurationstructure to be used with this action.timeout (
Union[int,float,None]) – TheJobRuntimeout 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:
- 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.
- crawler_name
The name of the crawler to be used with this action.
- job_name
The name of a job to be executed.
- notification_property
Specifies configuration properties of a job run notification.
- security_configuration
The name of the
SecurityConfigurationstructure to be used with this action.
- timeout
The
JobRuntimeout 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.
ConditionProperty
- class CfnTriggerPropsMixin.ConditionProperty(*, crawler_name=None, crawl_state=None, job_name=None, logical_operator=None, state=None)
Bases:
objectDefines 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 whoseJobRunsthis 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 areSUCCEEDED,STOPPED,TIMEOUT, andFAILED.
- See:
- 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.
- crawler_name
The name of the crawler to which this condition applies.
- job_name
The name of the job whose
JobRunsthis condition applies to, and on which this trigger waits.
- logical_operator
A logical operator.
- state
The condition state.
Currently, the values supported are
SUCCEEDED,STOPPED,TIMEOUT, andFAILED.
EventBatchingConditionProperty
- class CfnTriggerPropsMixin.EventBatchingConditionProperty(*, batch_size=None, batch_window=None)
Bases:
objectBatch 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:
- 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.
- batch_window
Window of time in seconds after which EventBridge event trigger fires.
Window starts when first event is received.
NotificationPropertyProperty
- class CfnTriggerPropsMixin.NotificationPropertyProperty(*, notify_delay_after=None)
Bases:
objectSpecifies 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:
- 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.
PredicateProperty
- class CfnTriggerPropsMixin.PredicateProperty(*, conditions=None, logical=None)
Bases:
objectDefines 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:
- 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.
- logical
An optional field if only one condition is listed.
If multiple conditions are listed, then this field is required.