Class: AWSCDK::Glue::CfnTriggerProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
glue/cfn_trigger_props.rb

Overview

Properties for defining a CfnTrigger.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(actions:, type:, description: nil, event_batching_condition: nil, name: nil, predicate: nil, schedule: nil, start_on_creation: nil, tags: nil, workflow_name: nil) ⇒ CfnTriggerProps

Returns a new instance of CfnTriggerProps.

Parameters:

  • actions (AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::Glue::CfnTrigger::ActionProperty>)

    The actions initiated by this trigger.

  • type (String)

    The type of trigger that this is.

  • description (String, nil) (defaults to: nil)

    A description of this trigger.

  • event_batching_condition (AWSCDK::IResolvable, AWSCDK::Glue::CfnTrigger::EventBatchingConditionProperty, nil) (defaults to: nil)

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

  • name (String, nil) (defaults to: nil)

    The name of the trigger.

  • predicate (AWSCDK::IResolvable, AWSCDK::Glue::CfnTrigger::PredicateProperty, nil) (defaults to: nil)

    The predicate of this trigger, which defines when it will fire.

  • schedule (String, nil) (defaults to: nil)

    A cron expression used to specify the schedule.

  • start_on_creation (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Set to true to start SCHEDULED and CONDITIONAL triggers when created.

  • tags (Object, nil) (defaults to: nil)

    The tags to use with this trigger.

  • workflow_name (String, nil) (defaults to: nil)

    The name of the workflow associated with the trigger.



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'glue/cfn_trigger_props.rb', line 19

def initialize(actions:, type:, description: nil, event_batching_condition: nil, name: nil, predicate: nil, schedule: nil, start_on_creation: nil, tags: nil, workflow_name: nil)
  @actions = actions
  Jsii::Type.check_type(@actions, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZ2x1ZS5DZm5UcmlnZ2VyLkFjdGlvblByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "actions")
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type")
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @event_batching_condition = event_batching_condition.is_a?(Hash) ? ::AWSCDK::Glue::CfnTrigger::EventBatchingConditionProperty.new(**event_batching_condition.transform_keys(&:to_sym)) : event_batching_condition
  Jsii::Type.check_type(@event_batching_condition, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19nbHVlLkNmblRyaWdnZXIuRXZlbnRCYXRjaGluZ0NvbmRpdGlvblByb3BlcnR5In1dfX0=")), "eventBatchingCondition") unless @event_batching_condition.nil?
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil?
  @predicate = predicate.is_a?(Hash) ? ::AWSCDK::Glue::CfnTrigger::PredicateProperty.new(**predicate.transform_keys(&:to_sym)) : predicate
  Jsii::Type.check_type(@predicate, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19nbHVlLkNmblRyaWdnZXIuUHJlZGljYXRlUHJvcGVydHkifV19fQ==")), "predicate") unless @predicate.nil?
  @schedule = schedule
  Jsii::Type.check_type(@schedule, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "schedule") unless @schedule.nil?
  @start_on_creation = start_on_creation
  Jsii::Type.check_type(@start_on_creation, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "startOnCreation") unless @start_on_creation.nil?
  @tags = tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "tags") unless @tags.nil?
  @workflow_name = workflow_name
  Jsii::Type.check_type(@workflow_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "workflowName") unless @workflow_name.nil?
end

Instance Attribute Details

#actionsAWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::Glue::CfnTrigger::ActionProperty> (readonly)

The actions initiated by this trigger.



46
47
48
# File 'glue/cfn_trigger_props.rb', line 46

def actions
  @actions
end

#descriptionString? (readonly)

A description of this trigger.



56
57
58
# File 'glue/cfn_trigger_props.rb', line 56

def description
  @description
end

#event_batching_conditionAWSCDK::IResolvable, ... (readonly)

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



61
62
63
# File 'glue/cfn_trigger_props.rb', line 61

def event_batching_condition
  @event_batching_condition
end

#nameString? (readonly)

The name of the trigger.



66
67
68
# File 'glue/cfn_trigger_props.rb', line 66

def name
  @name
end

#predicateAWSCDK::IResolvable, ... (readonly)

The predicate of this trigger, which defines when it will fire.



71
72
73
# File 'glue/cfn_trigger_props.rb', line 71

def predicate
  @predicate
end

#scheduleString? (readonly)

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 * * ? *) .



78
79
80
# File 'glue/cfn_trigger_props.rb', line 78

def schedule
  @schedule
end

#start_on_creationBoolean, ... (readonly)

Set to true to start SCHEDULED and CONDITIONAL triggers when created.

True is not supported for ON_DEMAND triggers.



85
86
87
# File 'glue/cfn_trigger_props.rb', line 85

def start_on_creation
  @start_on_creation
end

#tagsObject? (readonly)

The tags to use with this trigger.



90
91
92
# File 'glue/cfn_trigger_props.rb', line 90

def tags
  @tags
end

#typeString (readonly)

The type of trigger that this is.



51
52
53
# File 'glue/cfn_trigger_props.rb', line 51

def type
  @type
end

#workflow_nameString? (readonly)

The name of the workflow associated with the trigger.



95
96
97
# File 'glue/cfn_trigger_props.rb', line 95

def workflow_name
  @workflow_name
end

Class Method Details

.jsii_propertiesObject



97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'glue/cfn_trigger_props.rb', line 97

def self.jsii_properties
  {
    :actions => "actions",
    :type => "type",
    :description => "description",
    :event_batching_condition => "eventBatchingCondition",
    :name => "name",
    :predicate => "predicate",
    :schedule => "schedule",
    :start_on_creation => "startOnCreation",
    :tags => "tags",
    :workflow_name => "workflowName",
  }
end

Instance Method Details

#to_jsiiObject



112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# File 'glue/cfn_trigger_props.rb', line 112

def to_jsii
  result = {}
  result.merge!({
    "actions" => @actions,
    "type" => @type,
    "description" => @description,
    "eventBatchingCondition" => @event_batching_condition,
    "name" => @name,
    "predicate" => @predicate,
    "schedule" => @schedule,
    "startOnCreation" => @start_on_creation,
    "tags" => @tags,
    "workflowName" => @workflow_name,
  })
  result.compact
end