Class: AWSCDK::ApplicationAutoScaling::CronOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
application_auto_scaling/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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(day: nil, hour: nil, minute: nil, month: nil, week_day: nil, year: nil) ⇒ CronOptions

Returns a new instance of CronOptions.

Parameters:

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

    The day of the month to run this rule at.

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

    The hour to run this rule at.

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

    The minute to run this rule at.

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

    The month to run this rule at.

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

    The day of the week to run this rule at.

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

    The year to run this rule at.



18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'application_auto_scaling/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

#dayString? (readonly)

Note:

Default: - Every day of the month

The day of the month to run this rule at.

Returns:

  • (String, nil)


37
38
39
# File 'application_auto_scaling/cron_options.rb', line 37

def day
  @day
end

#hourString? (readonly)

Note:

Default: - Every hour

The hour to run this rule at.

Returns:

  • (String, nil)


42
43
44
# File 'application_auto_scaling/cron_options.rb', line 42

def hour
  @hour
end

#minuteString? (readonly)

Note:

Default: - Every minute

The minute to run this rule at.

Returns:

  • (String, nil)


47
48
49
# File 'application_auto_scaling/cron_options.rb', line 47

def minute
  @minute
end

#monthString? (readonly)

Note:

Default: - Every month

The month to run this rule at.

Returns:

  • (String, nil)


52
53
54
# File 'application_auto_scaling/cron_options.rb', line 52

def month
  @month
end

#week_dayString? (readonly)

Note:

Default: - Any day of the week

The day of the week to run this rule at.

Returns:

  • (String, nil)


57
58
59
# File 'application_auto_scaling/cron_options.rb', line 57

def week_day
  @week_day
end

#yearString? (readonly)

Note:

Default: - Every year

The year to run this rule at.

Returns:

  • (String, nil)


62
63
64
# File 'application_auto_scaling/cron_options.rb', line 62

def year
  @year
end

Class Method Details

.jsii_propertiesObject



64
65
66
67
68
69
70
71
72
73
# File 'application_auto_scaling/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_jsiiObject



75
76
77
78
79
80
81
82
83
84
85
86
# File 'application_auto_scaling/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