Class: AWSCDK::Events::Schedule
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::Events::Schedule
- Defined in:
- events/schedule.rb
Overview
Schedule for scheduled event rules.
Note that rates cannot be defined in fractions of minutes.
Class Method Summary collapse
-
.cron(options) ⇒ AWSCDK::Events::Schedule
Create a schedule from a set of cron fields.
-
.expression(expression) ⇒ AWSCDK::Events::Schedule
Construct a schedule from a literal schedule expression.
- .jsii_overridable_methods ⇒ Object
-
.rate(duration) ⇒ AWSCDK::Events::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.
12 13 14 |
# File 'events/schedule.rb', line 12 def initialize Jsii::Object.instance_method(:initialize).bind(self).call end |
Class Method Details
.cron(options) ⇒ AWSCDK::Events::Schedule
Create a schedule from a set of cron fields.
26 27 28 29 30 |
# File 'events/schedule.rb', line 26 def self.cron() = .is_a?(Hash) ? ::AWSCDK::Events::CronOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZlbnRzLkNyb25PcHRpb25zIn0=")), "options") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_events.Schedule", "cron", []) end |
.expression(expression) ⇒ AWSCDK::Events::Schedule
Construct a schedule from a literal schedule expression.
36 37 38 39 |
# File 'events/schedule.rb', line 36 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_events.Schedule", "expression", [expression]) end |
.jsii_overridable_methods ⇒ Object
16 17 18 19 20 |
# File 'events/schedule.rb', line 16 def self.jsii_overridable_methods { :expression_string => { kind: :property, name: "expressionString", is_optional: false }, } end |
.rate(duration) ⇒ AWSCDK::Events::Schedule
Construct a schedule from an interval and a time unit.
Rates may be defined with any unit of time, but when converted into minutes, the duration must be a positive whole number of minutes.
47 48 49 50 |
# File 'events/schedule.rb', line 47 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_events.Schedule", "rate", [duration]) end |
Instance Method Details
#expression_string ⇒ String
Retrieve the expression for this schedule.
55 56 57 |
# File 'events/schedule.rb', line 55 def expression_string() jsii_get_property("expressionString") end |