Condition Class
A 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.
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_glue as glue } from 'aws-cdk-lib';
import { aws_glue as interfaces_glue } from 'aws-cdk-lib/interfaces';
declare const crawlerRef: interfaces_glue.ICrawlerRef;
const condition = glue.Condition.crawler(crawlerRef, glue.CrawlerState.RUNNING, /* all optional props */ {
logicalOperator: glue.ConditionLogicalOperator.EQUALS,
});
Initializer
ts
new Condition()
python
Condition()
java
new Condition()
csharp
new Condition()
go
NewCondition()
Methods
crawler(crawler: ICrawlerRef, crawlState: CrawlerState, options?: ConditionOptions): Condition // chainable@staticmethod def crawler(crawler: ICrawlerRef, crawl_state: CrawlerState, options: typing.Optional[ConditionOptions] = None) -> Conditionpublic static Condition crawler(ICrawlerRef crawler, CrawlerState crawlState, ConditionOptions options)public static Condition Crawler(ICrawlerRef crawler, CrawlerState crawlState, ConditionOptions? options = null)func Crawler(Crawler ICrawlerRef, CrawlState CrawlerState, Options ConditionOptions) Conditionstatic#Create a condition on the state of a crawler.
3 parameters
Parameters
crawlercrawlercrawlercrawlerCrawler— the crawler to watch.crawlStatecrawl_statecrawlStatecrawlStateCrawlState— the crawler state that satisfies the condition.optionsoptionsoptionsoptionsOptions— additional options for the condition.
job(job: IJobRef, state: JobState, options?: ConditionOptions): Condition // chainable@staticmethod def job(job: IJobRef, state: JobState, options: typing.Optional[ConditionOptions] = None) -> Conditionpublic static Condition job(IJobRef job, JobState state, ConditionOptions options)public static Condition Job(IJobRef job, JobState state, ConditionOptions? options = null)func Job(Job IJobRef, State JobState, Options ConditionOptions) Conditionstatic#Create a condition on the state of a job.
3 parameters
Parameters
jobjobjobjobJob— the job to watch.statestatestatestateState— the job state that satisfies the condition.optionsoptionsoptionsoptionsOptions— additional options for the condition.