Class: AWSCDK::Datasync::CfnTask::TaskScheduleProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Datasync::CfnTask::TaskScheduleProperty
- Defined in:
- datasync/cfn_task.rb
Overview
Configures your AWS DataSync task to run on a schedule (at a minimum interval of 1 hour).
Instance Attribute Summary collapse
-
#schedule_expression ⇒ String?
readonly
Specifies your task schedule by using a cron or rate expression.
-
#status ⇒ String?
readonly
Specifies whether to enable or disable your task schedule.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(schedule_expression: nil, status: nil) ⇒ TaskScheduleProperty
constructor
A new instance of TaskScheduleProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(schedule_expression: nil, status: nil) ⇒ TaskScheduleProperty
Returns a new instance of TaskScheduleProperty.
1491 1492 1493 1494 1495 1496 |
# File 'datasync/cfn_task.rb', line 1491 def initialize(schedule_expression: nil, status: nil) @schedule_expression = schedule_expression Jsii::Type.check_type(@schedule_expression, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "scheduleExpression") unless @schedule_expression.nil? @status = status Jsii::Type.check_type(@status, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "status") unless @status.nil? end |
Instance Attribute Details
#schedule_expression ⇒ String? (readonly)
Specifies your task schedule by using a cron or rate expression.
Use cron expressions for task schedules that run on a specific time and day. For example, the following cron expression creates a task schedule that runs at 8 AM on the first Wednesday of every month:
cron(0 8 * * 3#1)
Use rate expressions for task schedules that run on a regular interval. For example, the following rate expression creates a task schedule that runs every 12 hours:
rate(12 hours)
For information about cron and rate expression syntax, see the Amazon EventBridge User Guide .
1512 1513 1514 |
# File 'datasync/cfn_task.rb', line 1512 def schedule_expression @schedule_expression end |
#status ⇒ String? (readonly)
Specifies whether to enable or disable your task schedule.
Your schedule is enabled by default, but there can be situations where you need to disable it. For example, you might need to pause a recurring transfer to fix an issue with your task or perform maintenance on your storage system.
DataSync might disable your schedule automatically if your task fails repeatedly with the same error. For more information, see TaskScheduleDetails .
1521 1522 1523 |
# File 'datasync/cfn_task.rb', line 1521 def status @status end |
Class Method Details
.jsii_properties ⇒ Object
1523 1524 1525 1526 1527 1528 |
# File 'datasync/cfn_task.rb', line 1523 def self.jsii_properties { :schedule_expression => "scheduleExpression", :status => "status", } end |
Instance Method Details
#to_jsii ⇒ Object
1530 1531 1532 1533 1534 1535 1536 1537 |
# File 'datasync/cfn_task.rb', line 1530 def to_jsii result = {} result.merge!({ "scheduleExpression" => @schedule_expression, "status" => @status, }) result.compact end |