Class: AWSCDK::Autoscaling::Schedule

Inherits:
Jsii::Object
  • Object
show all
Defined in:
autoscaling/schedule.rb

Overview

Schedule for scheduled scaling actions.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSchedule

Returns a new instance of Schedule.



8
9
10
# File 'autoscaling/schedule.rb', line 8

def initialize
  Jsii::Object.instance_method(:initialize).bind(self).call
end

Class Method Details

.cron(options) ⇒ AWSCDK::Autoscaling::Schedule

Create a schedule from a set of cron fields.

Parameters:

Returns:

  • (AWSCDK::Autoscaling::Schedule)


22
23
24
25
26
# File 'autoscaling/schedule.rb', line 22

def self.cron(options)
  options = options.is_a?(Hash) ? ::AWSCDK::Autoscaling::CronOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXV0b3NjYWxpbmcuQ3Jvbk9wdGlvbnMifQ==")), "options")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_autoscaling.Schedule", "cron", [options])
end

.expression(expression) ⇒ AWSCDK::Autoscaling::Schedule

Construct a schedule from a literal schedule expression.

Parameters:

  • expression (String)

    The expression to use.

Returns:

  • (AWSCDK::Autoscaling::Schedule)

See Also:



33
34
35
36
# File 'autoscaling/schedule.rb', line 33

def self.expression(expression)
  Jsii::Type.check_type(expression, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "expression")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_autoscaling.Schedule", "expression", [expression])
end

.jsii_overridable_methodsObject



12
13
14
15
16
# File 'autoscaling/schedule.rb', line 12

def self.jsii_overridable_methods
  {
    :expression_string => { kind: :property, name: "expressionString", is_optional: false },
  }
end

Instance Method Details

#expression_stringString

Retrieve the expression for this schedule.

Returns:

  • (String)


41
42
43
# File 'autoscaling/schedule.rb', line 41

def expression_string()
  jsii_get_property("expressionString")
end