Class: AWSCDK::Scheduler::ScheduleProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
scheduler/schedule_props.rb

Overview

Construction properties for Schedule.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(schedule:, target:, description: nil, enabled: nil, _end: nil, key: nil, schedule_group: nil, schedule_name: nil, start: nil, time_window: nil) ⇒ ScheduleProps

Returns a new instance of ScheduleProps.

Parameters:

  • schedule (AWSCDK::Scheduler::ScheduleExpression)

    The expression that defines when the schedule runs.

  • target (AWSCDK::Scheduler::IScheduleTarget)

    The schedule's target details.

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

    The description you specify for the schedule.

  • enabled (Boolean, nil) (defaults to: nil)

    Indicates whether the schedule is enabled.

  • _end (DateTime, nil) (defaults to: nil)

    The date, in UTC, before which the schedule can invoke its target.

  • key (AWSCDK::KMS::IKey, nil) (defaults to: nil)

    The customer managed KMS key that EventBridge Scheduler will use to encrypt and decrypt your data.

  • schedule_group (AWSCDK::Scheduler::IScheduleGroup, nil) (defaults to: nil)

    The schedule's group.

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

    The name of the schedule.

  • start (DateTime, nil) (defaults to: nil)

    The date, in UTC, after which the schedule can begin invoking its target.

  • time_window (AWSCDK::Scheduler::TimeWindow, nil) (defaults to: nil)

    A time window during which EventBridge Scheduler invokes the schedule.



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'scheduler/schedule_props.rb', line 17

def initialize(schedule:, target:, description: nil, enabled: nil, _end: nil, key: nil, schedule_group: nil, schedule_name: nil, start: nil, time_window: nil)
  @schedule = schedule
  Jsii::Type.check_type(@schedule, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2NoZWR1bGVyLlNjaGVkdWxlRXhwcmVzc2lvbiJ9")), "schedule")
  @target = target
  Jsii::Type.check_type(@target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2NoZWR1bGVyLklTY2hlZHVsZVRhcmdldCJ9")), "target")
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @enabled = enabled
  Jsii::Type.check_type(@enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "enabled") unless @enabled.nil?
  @_end = _end
  Jsii::Type.check_type(@_end, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJkYXRlIn0=")), "end") unless @_end.nil?
  @key = key
  Jsii::Type.check_type(@key, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa21zLklLZXkifQ==")), "key") unless @key.nil?
  @schedule_group = schedule_group
  Jsii::Type.check_type(@schedule_group, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2NoZWR1bGVyLklTY2hlZHVsZUdyb3VwIn0=")), "scheduleGroup") unless @schedule_group.nil?
  @schedule_name = schedule_name
  Jsii::Type.check_type(@schedule_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "scheduleName") unless @schedule_name.nil?
  @start = start
  Jsii::Type.check_type(@start, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJkYXRlIn0=")), "start") unless @start.nil?
  @time_window = time_window
  Jsii::Type.check_type(@time_window, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2NoZWR1bGVyLlRpbWVXaW5kb3cifQ==")), "timeWindow") unless @time_window.nil?
end

Instance Attribute Details

#_endDateTime? (readonly)

Note:

Default: - no value

The date, in UTC, before which the schedule can invoke its target.

EventBridge Scheduler ignores end for one-time schedules.

Returns:

  • (DateTime, nil)


67
68
69
# File 'scheduler/schedule_props.rb', line 67

def _end
  @_end
end

#descriptionString? (readonly)

Note:

Default: - no value

The description you specify for the schedule.

Returns:

  • (String, nil)


55
56
57
# File 'scheduler/schedule_props.rb', line 55

def description
  @description
end

#enabledBoolean? (readonly)

Note:

Default: true

Indicates whether the schedule is enabled.

Returns:

  • (Boolean, nil)


60
61
62
# File 'scheduler/schedule_props.rb', line 60

def enabled
  @enabled
end

#keyAWSCDK::KMS::IKey? (readonly)

Note:

Default: - All events in Scheduler are encrypted with a key that AWS owns and manages.

The customer managed KMS key that EventBridge Scheduler will use to encrypt and decrypt your data.

Returns:



72
73
74
# File 'scheduler/schedule_props.rb', line 72

def key
  @key
end

#scheduleAWSCDK::Scheduler::ScheduleExpression (readonly)

The expression that defines when the schedule runs.

Can be either a at, rate or cron expression.



46
47
48
# File 'scheduler/schedule_props.rb', line 46

def schedule
  @schedule
end

#schedule_groupAWSCDK::Scheduler::IScheduleGroup? (readonly)

Note:

Default: - By default a schedule will be associated with the default group.

The schedule's group.



77
78
79
# File 'scheduler/schedule_props.rb', line 77

def schedule_group
  @schedule_group
end

#schedule_nameString? (readonly)

Note:

Default: - A unique name will be generated

The name of the schedule.

Up to 64 letters (uppercase and lowercase), numbers, hyphens, underscores and dots are allowed.

Returns:

  • (String, nil)


84
85
86
# File 'scheduler/schedule_props.rb', line 84

def schedule_name
  @schedule_name
end

#startDateTime? (readonly)

Note:

Default: - no value

The date, in UTC, after which the schedule can begin invoking its target.

EventBridge Scheduler ignores start for one-time schedules.

Returns:

  • (DateTime, nil)


91
92
93
# File 'scheduler/schedule_props.rb', line 91

def start
  @start
end

#targetAWSCDK::Scheduler::IScheduleTarget (readonly)

The schedule's target details.



50
51
52
# File 'scheduler/schedule_props.rb', line 50

def target
  @target
end

#time_windowAWSCDK::Scheduler::TimeWindow? (readonly)

Note:

Default: TimeWindow.off()

A time window during which EventBridge Scheduler invokes the schedule.



97
98
99
# File 'scheduler/schedule_props.rb', line 97

def time_window
  @time_window
end

Class Method Details

.jsii_propertiesObject



99
100
101
102
103
104
105
106
107
108
109
110
111
112
# File 'scheduler/schedule_props.rb', line 99

def self.jsii_properties
  {
    :schedule => "schedule",
    :target => "target",
    :description => "description",
    :enabled => "enabled",
    :_end => "end",
    :key => "key",
    :schedule_group => "scheduleGroup",
    :schedule_name => "scheduleName",
    :start => "start",
    :time_window => "timeWindow",
  }
end

Instance Method Details

#to_jsiiObject



114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# File 'scheduler/schedule_props.rb', line 114

def to_jsii
  result = {}
  result.merge!({
    "schedule" => @schedule,
    "target" => @target,
    "description" => @description,
    "enabled" => @enabled,
    "end" => @_end,
    "key" => @key,
    "scheduleGroup" => @schedule_group,
    "scheduleName" => @schedule_name,
    "start" => @start,
    "timeWindow" => @time_window,
  })
  result.compact
end