Class CfnTrigger

java.lang.Object
software.amazon.jsii.JsiiObject
All Implemented Interfaces:
IConstruct, IDependable, IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:42.514Z") @Stability(Stable) public class CfnTrigger extends CfnResource implements IInspectable
A CloudFormation AWS::Glue::Trigger.

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 .

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.glue.*;
 Object arguments_;
 Object tags;
 CfnTrigger cfnTrigger = CfnTrigger.Builder.create(this, "MyCfnTrigger")
         .actions(List.of(ActionProperty.builder()
                 .arguments(arguments_)
                 .crawlerName("crawlerName")
                 .jobName("jobName")
                 .notificationProperty(NotificationPropertyProperty.builder()
                         .notifyDelayAfter(123)
                         .build())
                 .securityConfiguration("securityConfiguration")
                 .timeout(123)
                 .build()))
         .type("type")
         // the properties below are optional
         .description("description")
         .eventBatchingCondition(EventBatchingConditionProperty.builder()
                 .batchSize(123)
                 // the properties below are optional
                 .batchWindow(123)
                 .build())
         .name("name")
         .predicate(PredicateProperty.builder()
                 .conditions(List.of(ConditionProperty.builder()
                         .crawlerName("crawlerName")
                         .crawlState("crawlState")
                         .jobName("jobName")
                         .logicalOperator("logicalOperator")
                         .state("state")
                         .build()))
                 .logical("logical")
                 .build())
         .schedule("schedule")
         .startOnCreation(false)
         .tags(tags)
         .workflowName("workflowName")
         .build();
 
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnTrigger

      protected CfnTrigger(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnTrigger

      protected CfnTrigger(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnTrigger

      @Stability(Stable) public CfnTrigger(@NotNull Construct scope, @NotNull String id, @NotNull CfnTriggerProps props)
      Create a new AWS::Glue::Trigger.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      props -
      • resource properties.
      This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector -
      • tree inspector to collect and process attributes.
      This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      The tags to use with this trigger.
    • getActions

      @Stability(Stable) @NotNull public Object getActions()
      The actions initiated by this trigger.
    • setActions

      @Stability(Stable) public void setActions(@NotNull IResolvable value)
      The actions initiated by this trigger.
    • setActions

      @Stability(Stable) public void setActions(@NotNull List<Object> value)
      The actions initiated by this trigger.
    • getType

      @Stability(Stable) @NotNull public String getType()
      The type of trigger that this is.
    • setType

      @Stability(Stable) public void setType(@NotNull String value)
      The type of trigger that this is.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      A description of this trigger.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      A description of this trigger.
    • getEventBatchingCondition

      @Stability(Stable) @Nullable public Object getEventBatchingCondition()
      Batch condition that must be met (specified number of events received or batch time window expired) before EventBridge event trigger fires.
    • setEventBatchingCondition

      @Stability(Stable) public void setEventBatchingCondition(@Nullable IResolvable value)
      Batch condition that must be met (specified number of events received or batch time window expired) before EventBridge event trigger fires.
    • setEventBatchingCondition

      @Stability(Stable) public void setEventBatchingCondition(@Nullable CfnTrigger.EventBatchingConditionProperty value)
      Batch condition that must be met (specified number of events received or batch time window expired) before EventBridge event trigger fires.
    • getName

      @Stability(Stable) @Nullable public String getName()
      The name of the trigger.
    • setName

      @Stability(Stable) public void setName(@Nullable String value)
      The name of the trigger.
    • getPredicate

      @Stability(Stable) @Nullable public Object getPredicate()
      The predicate of this trigger, which defines when it will fire.
    • setPredicate

      @Stability(Stable) public void setPredicate(@Nullable IResolvable value)
      The predicate of this trigger, which defines when it will fire.
    • setPredicate

      @Stability(Stable) public void setPredicate(@Nullable CfnTrigger.PredicateProperty value)
      The predicate of this trigger, which defines when it will fire.
    • getSchedule

      @Stability(Stable) @Nullable public String getSchedule()
      A cron expression used to specify the schedule.

      For more information, see Time-Based Schedules for Jobs and Crawlers in the AWS Glue Developer Guide . For example, to run something every day at 12:15 UTC, specify cron(15 12 * * ? *) .

    • setSchedule

      @Stability(Stable) public void setSchedule(@Nullable String value)
      A cron expression used to specify the schedule.

      For more information, see Time-Based Schedules for Jobs and Crawlers in the AWS Glue Developer Guide . For example, to run something every day at 12:15 UTC, specify cron(15 12 * * ? *) .

    • getStartOnCreation

      @Stability(Stable) @Nullable public Object getStartOnCreation()
      Set to true to start SCHEDULED and CONDITIONAL triggers when created.

      True is not supported for ON_DEMAND triggers.

    • setStartOnCreation

      @Stability(Stable) public void setStartOnCreation(@Nullable Boolean value)
      Set to true to start SCHEDULED and CONDITIONAL triggers when created.

      True is not supported for ON_DEMAND triggers.

    • setStartOnCreation

      @Stability(Stable) public void setStartOnCreation(@Nullable IResolvable value)
      Set to true to start SCHEDULED and CONDITIONAL triggers when created.

      True is not supported for ON_DEMAND triggers.

    • getWorkflowName

      @Stability(Stable) @Nullable public String getWorkflowName()
      The name of the workflow associated with the trigger.
    • setWorkflowName

      @Stability(Stable) public void setWorkflowName(@Nullable String value)
      The name of the workflow associated with the trigger.