Class: AWSCDK::StepFunctionsTasks::CronOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::StepFunctionsTasks::CronOptions
- Defined in:
- step_functions_tasks/cron_options.rb
Overview
Options to configure a cron expression.
All fields are strings so you can use complex expressions. Absence of a field implies '*' or '?', whichever one is appropriate.
Instance Attribute Summary collapse
-
#day ⇒ String?
readonly
The day of the month to run this rule at.
-
#hour ⇒ String?
readonly
The hour to run this rule at.
-
#minute ⇒ String?
readonly
The minute to run this rule at.
-
#month ⇒ String?
readonly
The month to run this rule at.
-
#week_day ⇒ String?
readonly
The day of the week to run this rule at.
-
#year ⇒ String?
readonly
The year to run this rule at.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(day: nil, hour: nil, minute: nil, month: nil, week_day: nil, year: nil) ⇒ CronOptions
constructor
A new instance of CronOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(day: nil, hour: nil, minute: nil, month: nil, week_day: nil, year: nil) ⇒ CronOptions
Returns a new instance of CronOptions.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'step_functions_tasks/cron_options.rb', line 18 def initialize(day: nil, hour: nil, minute: nil, month: nil, week_day: nil, year: nil) @day = day Jsii::Type.check_type(@day, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "day") unless @day.nil? @hour = hour Jsii::Type.check_type(@hour, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "hour") unless @hour.nil? @minute = minute Jsii::Type.check_type(@minute, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "minute") unless @minute.nil? @month = month Jsii::Type.check_type(@month, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "month") unless @month.nil? @week_day = week_day Jsii::Type.check_type(@week_day, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "weekDay") unless @week_day.nil? @year = year Jsii::Type.check_type(@year, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "year") unless @year.nil? end |
Instance Attribute Details
#day ⇒ String? (readonly)
Default: - Every day of the month
The day of the month to run this rule at.
37 38 39 |
# File 'step_functions_tasks/cron_options.rb', line 37 def day @day end |
#hour ⇒ String? (readonly)
Default: - Every hour
The hour to run this rule at.
42 43 44 |
# File 'step_functions_tasks/cron_options.rb', line 42 def hour @hour end |
#minute ⇒ String? (readonly)
Default: - Every minute
The minute to run this rule at.
47 48 49 |
# File 'step_functions_tasks/cron_options.rb', line 47 def minute @minute end |
#month ⇒ String? (readonly)
Default: - Every month
The month to run this rule at.
52 53 54 |
# File 'step_functions_tasks/cron_options.rb', line 52 def month @month end |
#week_day ⇒ String? (readonly)
Default: - Whichever day of the week that day falls on
The day of the week to run this rule at.
57 58 59 |
# File 'step_functions_tasks/cron_options.rb', line 57 def week_day @week_day end |
#year ⇒ String? (readonly)
Default: - Every year
The year to run this rule at.
62 63 64 |
# File 'step_functions_tasks/cron_options.rb', line 62 def year @year end |
Class Method Details
.jsii_properties ⇒ Object
64 65 66 67 68 69 70 71 72 73 |
# File 'step_functions_tasks/cron_options.rb', line 64 def self.jsii_properties { :day => "day", :hour => "hour", :minute => "minute", :month => "month", :week_day => "weekDay", :year => "year", } end |
Instance Method Details
#to_jsii ⇒ Object
75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'step_functions_tasks/cron_options.rb', line 75 def to_jsii result = {} result.merge!({ "day" => @day, "hour" => @hour, "minute" => @minute, "month" => @month, "weekDay" => @week_day, "year" => @year, }) result.compact end |