Class: AWSCDK::Scheduler::CfnScheduleProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Scheduler::CfnScheduleProps
- Defined in:
- scheduler/cfn_schedule_props.rb
Overview
Properties for defining a CfnSchedule.
Instance Attribute Summary collapse
-
#description ⇒ String?
readonly
The description you specify for the schedule.
-
#end_date ⇒ String?
readonly
The date, in UTC, before which the schedule can invoke its target.
-
#flexible_time_window ⇒ AWSCDK::IResolvable, AWSCDK::Scheduler::CfnSchedule::FlexibleTimeWindowProperty
readonly
Allows you to configure a time window during which EventBridge Scheduler invokes the schedule.
-
#group_name ⇒ String?
readonly
The name of the schedule group associated with this schedule.
-
#kms_key_arn ⇒ String, ...
readonly
The Amazon Resource Name (ARN) for the customer managed KMS key that EventBridge Scheduler will use to encrypt and decrypt your data.
-
#name ⇒ String?
readonly
The name of the schedule.
-
#schedule_expression ⇒ String
readonly
The expression that defines when the schedule runs.
-
#schedule_expression_timezone ⇒ String?
readonly
The timezone in which the scheduling expression is evaluated.
-
#start_date ⇒ String?
readonly
The date, in UTC, after which the schedule can begin invoking its target.
-
#state ⇒ String?
readonly
Specifies whether the schedule is enabled or disabled.
-
#target ⇒ AWSCDK::IResolvable, AWSCDK::Scheduler::CfnSchedule::TargetProperty
readonly
The schedule's target details.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(flexible_time_window:, schedule_expression:, target:, description: nil, end_date: nil, group_name: nil, kms_key_arn: nil, name: nil, schedule_expression_timezone: nil, start_date: nil, state: nil) ⇒ CfnScheduleProps
constructor
A new instance of CfnScheduleProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(flexible_time_window:, schedule_expression:, target:, description: nil, end_date: nil, group_name: nil, kms_key_arn: nil, name: nil, schedule_expression_timezone: nil, start_date: nil, state: nil) ⇒ CfnScheduleProps
Returns a new instance of CfnScheduleProps.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'scheduler/cfn_schedule_props.rb', line 20 def initialize(flexible_time_window:, schedule_expression:, target:, description: nil, end_date: nil, group_name: nil, kms_key_arn: nil, name: nil, schedule_expression_timezone: nil, start_date: nil, state: nil) @flexible_time_window = flexible_time_window.is_a?(Hash) ? ::AWSCDK::Scheduler::CfnSchedule::FlexibleTimeWindowProperty.new(**flexible_time_window.transform_keys(&:to_sym)) : flexible_time_window Jsii::Type.check_type(@flexible_time_window, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zY2hlZHVsZXIuQ2ZuU2NoZWR1bGUuRmxleGlibGVUaW1lV2luZG93UHJvcGVydHkifV19fQ==")), "flexibleTimeWindow") @schedule_expression = schedule_expression Jsii::Type.check_type(@schedule_expression, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "scheduleExpression") @target = target.is_a?(Hash) ? ::AWSCDK::Scheduler::CfnSchedule::TargetProperty.new(**target.transform_keys(&:to_sym)) : target Jsii::Type.check_type(@target, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zY2hlZHVsZXIuQ2ZuU2NoZWR1bGUuVGFyZ2V0UHJvcGVydHkifV19fQ==")), "target") @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @end_date = end_date Jsii::Type.check_type(@end_date, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "endDate") unless @end_date.nil? @group_name = group_name Jsii::Type.check_type(@group_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "groupName") unless @group_name.nil? @kms_key_arn = kms_key_arn Jsii::Type.check_type(@kms_key_arn, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19rbXMuSUtleVJlZiJ9XX19")), "kmsKeyArn") unless @kms_key_arn.nil? @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil? @schedule_expression_timezone = schedule_expression_timezone Jsii::Type.check_type(@schedule_expression_timezone, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "scheduleExpressionTimezone") unless @schedule_expression_timezone.nil? @start_date = start_date Jsii::Type.check_type(@start_date, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "startDate") unless @start_date.nil? @state = state Jsii::Type.check_type(@state, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "state") unless @state.nil? end |
Instance Attribute Details
#description ⇒ String? (readonly)
The description you specify for the schedule.
76 77 78 |
# File 'scheduler/cfn_schedule_props.rb', line 76 def description @description end |
#end_date ⇒ String? (readonly)
The date, in UTC, before which the schedule can invoke its target.
Depending on the schedule's recurrence expression, invocations might stop on, or before, the EndDate you specify.
EventBridge Scheduler ignores EndDate for one-time schedules.
84 85 86 |
# File 'scheduler/cfn_schedule_props.rb', line 84 def end_date @end_date end |
#flexible_time_window ⇒ AWSCDK::IResolvable, AWSCDK::Scheduler::CfnSchedule::FlexibleTimeWindowProperty (readonly)
Allows you to configure a time window during which EventBridge Scheduler invokes the schedule.
49 50 51 |
# File 'scheduler/cfn_schedule_props.rb', line 49 def flexible_time_window @flexible_time_window end |
#group_name ⇒ String? (readonly)
The name of the schedule group associated with this schedule.
89 90 91 |
# File 'scheduler/cfn_schedule_props.rb', line 89 def group_name @group_name end |
#kms_key_arn ⇒ String, ... (readonly)
The Amazon Resource Name (ARN) for the customer managed KMS key that EventBridge Scheduler will use to encrypt and decrypt your data.
94 95 96 |
# File 'scheduler/cfn_schedule_props.rb', line 94 def kms_key_arn @kms_key_arn end |
#name ⇒ String? (readonly)
The name of the schedule.
99 100 101 |
# File 'scheduler/cfn_schedule_props.rb', line 99 def name @name end |
#schedule_expression ⇒ String (readonly)
The expression that defines when the schedule runs. The following formats are supported.
atexpression -at(yyyy-mm-ddThh:mm:ss)rateexpression -rate(value unit)cronexpression -cron(fields)
You can use at expressions to create one-time schedules that invoke a target once, at the time and in the time zone, that you specify. You can use rate and cron expressions to create recurring schedules. Rate-based schedules are useful when you want to invoke a target at regular intervals, such as every 15 minutes or every five days. Cron-based schedules are useful when you want to invoke a target periodically at a specific time, such as at 8:00 am (UTC+0) every 1st day of the month.
A cron expression consists of six fields separated by white spaces: (minutes hours day_of_month month day_of_week year) .
A rate expression consists of a value as a positive integer, and a unit with the following options: minute | minutes | hour | hours | day | days
For more information and examples, see Schedule types on EventBridge Scheduler in the EventBridge Scheduler User Guide .
66 67 68 |
# File 'scheduler/cfn_schedule_props.rb', line 66 def schedule_expression @schedule_expression end |
#schedule_expression_timezone ⇒ String? (readonly)
The timezone in which the scheduling expression is evaluated.
104 105 106 |
# File 'scheduler/cfn_schedule_props.rb', line 104 def schedule_expression_timezone @schedule_expression_timezone end |
#start_date ⇒ String? (readonly)
The date, in UTC, after which the schedule can begin invoking its target.
Depending on the schedule's recurrence expression, invocations might occur on, or after, the StartDate you specify.
EventBridge Scheduler ignores StartDate for one-time schedules.
112 113 114 |
# File 'scheduler/cfn_schedule_props.rb', line 112 def start_date @start_date end |
#state ⇒ String? (readonly)
Specifies whether the schedule is enabled or disabled.
Allowed Values : ENABLED | DISABLED
119 120 121 |
# File 'scheduler/cfn_schedule_props.rb', line 119 def state @state end |
#target ⇒ AWSCDK::IResolvable, AWSCDK::Scheduler::CfnSchedule::TargetProperty (readonly)
The schedule's target details.
71 72 73 |
# File 'scheduler/cfn_schedule_props.rb', line 71 def target @target end |
Class Method Details
.jsii_properties ⇒ Object
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'scheduler/cfn_schedule_props.rb', line 121 def self.jsii_properties { :flexible_time_window => "flexibleTimeWindow", :schedule_expression => "scheduleExpression", :target => "target", :description => "description", :end_date => "endDate", :group_name => "groupName", :kms_key_arn => "kmsKeyArn", :name => "name", :schedule_expression_timezone => "scheduleExpressionTimezone", :start_date => "startDate", :state => "state", } end |
Instance Method Details
#to_jsii ⇒ Object
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'scheduler/cfn_schedule_props.rb', line 137 def to_jsii result = {} result.merge!({ "flexibleTimeWindow" => @flexible_time_window, "scheduleExpression" => @schedule_expression, "target" => @target, "description" => @description, "endDate" => @end_date, "groupName" => @group_name, "kmsKeyArn" => @kms_key_arn, "name" => @name, "scheduleExpressionTimezone" => @schedule_expression_timezone, "startDate" => @start_date, "state" => @state, }) result.compact end |