Class: AWSCDK::Autoscaling::Schedule
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::Autoscaling::Schedule
- Defined in:
- autoscaling/schedule.rb
Overview
Schedule for scheduled scaling actions.
Class Method Summary collapse
-
.cron(options) ⇒ AWSCDK::Autoscaling::Schedule
Create a schedule from a set of cron fields.
-
.expression(expression) ⇒ AWSCDK::Autoscaling::Schedule
Construct a schedule from a literal schedule expression.
- .jsii_overridable_methods ⇒ Object
Instance Method Summary collapse
-
#expression_string ⇒ String
Retrieve the expression for this schedule.
-
#initialize ⇒ Schedule
constructor
A new instance of Schedule.
Constructor Details
#initialize ⇒ Schedule
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.
22 23 24 25 26 |
# File 'autoscaling/schedule.rb', line 22 def self.cron() = .is_a?(Hash) ? ::AWSCDK::Autoscaling::CronOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXV0b3NjYWxpbmcuQ3Jvbk9wdGlvbnMifQ==")), "options") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_autoscaling.Schedule", "cron", []) end |
.expression(expression) ⇒ AWSCDK::Autoscaling::Schedule
Construct a schedule from a literal schedule expression.
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_methods ⇒ Object
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_string ⇒ String
Retrieve the expression for this schedule.
41 42 43 |
# File 'autoscaling/schedule.rb', line 41 def expression_string() jsii_get_property("expressionString") end |