Class: AWSCDK::ApplicationAutoScaling::Schedule
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::ApplicationAutoScaling::Schedule
- Defined in:
- application_auto_scaling/schedule.rb
Overview
Schedule for scheduled scaling actions.
Class Method Summary collapse
-
.at(moment) ⇒ AWSCDK::ApplicationAutoScaling::Schedule
Construct a Schedule from a moment in time.
-
.cron(options) ⇒ AWSCDK::ApplicationAutoScaling::Schedule
Create a schedule from a set of cron fields.
-
.expression(expression) ⇒ AWSCDK::ApplicationAutoScaling::Schedule
Construct a schedule from a literal schedule expression.
- .jsii_overridable_methods ⇒ Object
-
.rate(duration) ⇒ AWSCDK::ApplicationAutoScaling::Schedule
Construct a schedule from an interval and a time unit.
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 'application_auto_scaling/schedule.rb', line 8 def initialize Jsii::Object.instance_method(:initialize).bind(self).call end |
Class Method Details
.at(moment) ⇒ AWSCDK::ApplicationAutoScaling::Schedule
Construct a Schedule from a moment in time.
22 23 24 25 |
# File 'application_auto_scaling/schedule.rb', line 22 def self.at(moment) Jsii::Type.check_type(moment, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJkYXRlIn0=")), "moment") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_applicationautoscaling.Schedule", "at", [moment]) end |
.cron(options) ⇒ AWSCDK::ApplicationAutoScaling::Schedule
Create a schedule from a set of cron fields.
31 32 33 34 35 |
# File 'application_auto_scaling/schedule.rb', line 31 def self.cron() = .is_a?(Hash) ? ::AWSCDK::ApplicationAutoScaling::CronOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwbGljYXRpb25hdXRvc2NhbGluZy5Dcm9uT3B0aW9ucyJ9")), "options") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_applicationautoscaling.Schedule", "cron", []) end |
.expression(expression) ⇒ AWSCDK::ApplicationAutoScaling::Schedule
Construct a schedule from a literal schedule expression.
41 42 43 44 |
# File 'application_auto_scaling/schedule.rb', line 41 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_applicationautoscaling.Schedule", "expression", [expression]) end |
.jsii_overridable_methods ⇒ Object
12 13 14 15 16 |
# File 'application_auto_scaling/schedule.rb', line 12 def self.jsii_overridable_methods { :expression_string => { kind: :property, name: "expressionString", is_optional: false }, } end |
.rate(duration) ⇒ AWSCDK::ApplicationAutoScaling::Schedule
Construct a schedule from an interval and a time unit.
50 51 52 53 |
# File 'application_auto_scaling/schedule.rb', line 50 def self.rate(duration) Jsii::Type.check_type(duration, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "duration") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_applicationautoscaling.Schedule", "rate", [duration]) end |
Instance Method Details
#expression_string ⇒ String
Retrieve the expression for this schedule.
58 59 60 |
# File 'application_auto_scaling/schedule.rb', line 58 def expression_string() jsii_get_property("expressionString") end |