Class: AWSCDK::Synthetics::Schedule
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::Synthetics::Schedule
- Defined in:
- synthetics/schedule.rb
Overview
Schedule for canary runs.
Class Method Summary collapse
-
.cron(options) ⇒ AWSCDK::Synthetics::Schedule
Create a schedule from a set of cron fields.
-
.expression(expression) ⇒ AWSCDK::Synthetics::Schedule
Construct a schedule from a literal schedule expression.
- .jsii_overridable_methods ⇒ Object
-
.once ⇒ AWSCDK::Synthetics::Schedule
The canary will be executed once.
-
.rate(interval) ⇒ AWSCDK::Synthetics::Schedule
Construct a schedule from an interval.
Instance Method Summary collapse
-
#expression_string ⇒ String
The Schedule expression.
-
#initialize(*args) ⇒ Schedule
constructor
A new instance of Schedule.
Constructor Details
#initialize(*args) ⇒ Schedule
Returns a new instance of Schedule.
8 9 10 |
# File 'synthetics/schedule.rb', line 8 def initialize(*args) raise NoMethodError, "aws-cdk-lib.aws_synthetics.Schedule does not have a visible constructor; use the provided factory methods" end |
Class Method Details
.cron(options) ⇒ AWSCDK::Synthetics::Schedule
Create a schedule from a set of cron fields.
22 23 24 25 26 |
# File 'synthetics/schedule.rb', line 22 def self.cron() = .is_a?(Hash) ? ::AWSCDK::Synthetics::CronOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3ludGhldGljcy5Dcm9uT3B0aW9ucyJ9")), "options") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_synthetics.Schedule", "cron", []) end |
.expression(expression) ⇒ AWSCDK::Synthetics::Schedule
Construct a schedule from a literal schedule expression.
The expression must be in a rate(number units) format.
For example, Schedule.expression('rate(10 minutes)')
35 36 37 38 |
# File 'synthetics/schedule.rb', line 35 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_synthetics.Schedule", "expression", [expression]) end |
.jsii_overridable_methods ⇒ Object
12 13 14 15 16 |
# File 'synthetics/schedule.rb', line 12 def self.jsii_overridable_methods { :expression_string => { kind: :property, name: "expressionString", is_optional: false }, } end |
.once ⇒ AWSCDK::Synthetics::Schedule
The canary will be executed once.
43 44 45 |
# File 'synthetics/schedule.rb', line 43 def self.once() Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_synthetics.Schedule", "once", []) end |
.rate(interval) ⇒ AWSCDK::Synthetics::Schedule
Construct a schedule from an interval.
Allowed values: 0 (for a single run) or between 1 and 60 minutes.
To specify a single run, you can use Schedule.once().
54 55 56 57 |
# File 'synthetics/schedule.rb', line 54 def self.rate(interval) Jsii::Type.check_type(interval, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "interval") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_synthetics.Schedule", "rate", [interval]) end |
Instance Method Details
#expression_string ⇒ String
The Schedule expression.
62 63 64 |
# File 'synthetics/schedule.rb', line 62 def expression_string() jsii_get_property("expressionString") end |