Condition
- class aws_cdk.aws_glue.Condition
Bases:
objectA condition that determines when a conditional trigger fires.
A condition watches exactly one target in exactly one state: use {@link Condition.job} to watch a job or {@link Condition.crawler} to watch a crawler. Because the state is a required argument of each factory, a condition can never reference a target without its state, or both a job and a crawler.
- 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 import aws_glue as glue from aws_cdk.interfaces import aws_glue as interfaces_glue # crawler_ref: interfaces_glue.ICrawlerRef condition = glue.Condition.crawler(crawler_ref, glue.CrawlerState.RUNNING, logical_operator=glue.ConditionLogicalOperator.EQUALS )
Static Methods
- classmethod crawler(crawler, crawl_state, *, logical_operator=None)
Create a condition on the state of a crawler.
- Parameters:
crawler (
ICrawlerRef) – the crawler to watch.crawl_state (
CrawlerState) – the crawler state that satisfies the condition.logical_operator (
Optional[ConditionLogicalOperator]) – The logical operator for the condition. Default: ConditionLogicalOperator.EQUALS
- Return type:
- classmethod job(job, state, *, logical_operator=None)
Create a condition on the state of a job.
- Parameters:
job (
IJobRef) – the job to watch.state (
JobState) – the job state that satisfies the condition.logical_operator (
Optional[ConditionLogicalOperator]) – The logical operator for the condition. Default: ConditionLogicalOperator.EQUALS
- Return type: