Class: Aws::DLM::Types::CreateRule
- Inherits:
-
Struct
- Object
- Struct
- Aws::DLM::Types::CreateRule
- Includes:
- Structure
- Defined in:
- lib/aws-sdk-dlm/types.rb
Overview
**[Custom snapshot and AMI policies only]** Specifies when the policy should create snapshots or AMIs.
<note markdown=“1”> * You must specify either CronExpression, or Interval,
**IntervalUnit**, and **Times**.
-
If you need to specify an [ArchiveRule] for the schedule, then you must specify a creation frequency of at least 28 days.
</note>
[1]: docs.aws.amazon.com/dlm/latest/APIReference/API_ArchiveRule.html
Constant Summary collapse
- SENSITIVE =
[]
Instance Attribute Summary collapse
-
#cron_expression ⇒ String
The schedule, as a Cron expression.
-
#interval ⇒ Integer
The interval between snapshots.
-
#interval_unit ⇒ String
The interval unit.
-
#location ⇒ String
**[Custom snapshot policies only]** Specifies the destination for snapshots created by the policy.
-
#scripts ⇒ Array<Types::Script>
**[Custom snapshot policies that target instances only]** Specifies pre and/or post scripts for a snapshot lifecycle policy that targets instances.
-
#times ⇒ Array<String>
The time, in UTC, to start the operation.
Instance Attribute Details
#cron_expression ⇒ String
The schedule, as a Cron expression. The schedule interval must be between 1 hour and 1 year. For more information, see [Cron expressions] in the *Amazon CloudWatch User Guide*.
[1]: docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html#CronExpressions
284 285 286 287 288 289 290 291 292 293 |
# File 'lib/aws-sdk-dlm/types.rb', line 284 class CreateRule < Struct.new( :location, :interval, :interval_unit, :times, :cron_expression, :scripts) SENSITIVE = [] include Aws::Structure end |
#interval ⇒ Integer
The interval between snapshots. The supported values are 1, 2, 3, 4, 6, 8, 12, and 24.
284 285 286 287 288 289 290 291 292 293 |
# File 'lib/aws-sdk-dlm/types.rb', line 284 class CreateRule < Struct.new( :location, :interval, :interval_unit, :times, :cron_expression, :scripts) SENSITIVE = [] include Aws::Structure end |
#interval_unit ⇒ String
The interval unit.
284 285 286 287 288 289 290 291 292 293 |
# File 'lib/aws-sdk-dlm/types.rb', line 284 class CreateRule < Struct.new( :location, :interval, :interval_unit, :times, :cron_expression, :scripts) SENSITIVE = [] include Aws::Structure end |
#location ⇒ String
**[Custom snapshot policies only]** Specifies the destination for snapshots created by the policy. To create snapshots in the same Region as the source resource, specify ‘CLOUD`. To create snapshots on the same Outpost as the source resource, specify `OUTPOST_LOCAL`. If you omit this parameter, `CLOUD` is used by default.
If the policy targets resources in an Amazon Web Services Region, then you must create snapshots in the same Region as the source resource. If the policy targets resources on an Outpost, then you can create snapshots on the same Outpost as the source resource, or in the Region of that Outpost.
284 285 286 287 288 289 290 291 292 293 |
# File 'lib/aws-sdk-dlm/types.rb', line 284 class CreateRule < Struct.new( :location, :interval, :interval_unit, :times, :cron_expression, :scripts) SENSITIVE = [] include Aws::Structure end |
#scripts ⇒ Array<Types::Script>
**[Custom snapshot policies that target instances only]** Specifies pre and/or post scripts for a snapshot lifecycle policy that targets instances. This is useful for creating application-consistent snapshots, or for performing specific administrative tasks before or after Amazon Data Lifecycle Manager initiates snapshot creation.
For more information, see [Automating application-consistent snapshots with pre and post scripts].
[1]: docs.aws.amazon.com/AWSEC2/latest/UserGuide/automate-app-consistent-backups.html
284 285 286 287 288 289 290 291 292 293 |
# File 'lib/aws-sdk-dlm/types.rb', line 284 class CreateRule < Struct.new( :location, :interval, :interval_unit, :times, :cron_expression, :scripts) SENSITIVE = [] include Aws::Structure end |
#times ⇒ Array<String>
The time, in UTC, to start the operation. The supported format is hh:mm.
The operation occurs within a one-hour window following the specified time. If you do not specify a time, Amazon Data Lifecycle Manager selects a time within the next 24 hours.
284 285 286 287 288 289 290 291 292 293 |
# File 'lib/aws-sdk-dlm/types.rb', line 284 class CreateRule < Struct.new( :location, :interval, :interval_unit, :times, :cron_expression, :scripts) SENSITIVE = [] include Aws::Structure end |