class Aws::DLM::Types::Schedule

Specifies a backup schedule for a snapshot or AMI lifecycle policy.

@note When making an API call, you may pass Schedule

data as a hash:

    {
      name: "ScheduleName",
      copy_tags: false,
      tags_to_add: [
        {
          key: "String", # required
          value: "String", # required
        },
      ],
      variable_tags: [
        {
          key: "String", # required
          value: "String", # required
        },
      ],
      create_rule: {
        location: "CLOUD", # accepts CLOUD, OUTPOST_LOCAL
        interval: 1,
        interval_unit: "HOURS", # accepts HOURS
        times: ["Time"],
        cron_expression: "CronExpression",
      },
      retain_rule: {
        count: 1,
        interval: 1,
        interval_unit: "DAYS", # accepts DAYS, WEEKS, MONTHS, YEARS
      },
      fast_restore_rule: {
        count: 1,
        interval: 1,
        interval_unit: "DAYS", # accepts DAYS, WEEKS, MONTHS, YEARS
        availability_zones: ["AvailabilityZone"], # required
      },
      cross_region_copy_rules: [
        {
          target_region: "TargetRegion",
          target: "Target",
          encrypted: false, # required
          cmk_arn: "CmkArn",
          copy_tags: false,
          retain_rule: {
            interval: 1,
            interval_unit: "DAYS", # accepts DAYS, WEEKS, MONTHS, YEARS
          },
          deprecate_rule: {
            interval: 1,
            interval_unit: "DAYS", # accepts DAYS, WEEKS, MONTHS, YEARS
          },
        },
      ],
      share_rules: [
        {
          target_accounts: ["AwsAccountId"], # required
          unshare_interval: 1,
          unshare_interval_unit: "DAYS", # accepts DAYS, WEEKS, MONTHS, YEARS
        },
      ],
      deprecate_rule: {
        count: 1,
        interval: 1,
        interval_unit: "DAYS", # accepts DAYS, WEEKS, MONTHS, YEARS
      },
    }

@!attribute [rw] name

The name of the schedule.
@return [String]

@!attribute [rw] copy_tags

Copy all user-defined tags on a source volume to snapshots of the
volume created by this policy.
@return [Boolean]

@!attribute [rw] tags_to_add

The tags to apply to policy-created resources. These user-defined
tags are in addition to the Amazon Web Services-added lifecycle
tags.
@return [Array<Types::Tag>]

@!attribute [rw] variable_tags

A collection of key/value pairs with values determined dynamically
when the policy is executed. Keys may be any valid Amazon EC2 tag
key. Values must be in one of the two following formats:
`$(instance-id)` or `$(timestamp)`. Variable tags are only valid for
EBS Snapshot Management – Instance policies.
@return [Array<Types::Tag>]

@!attribute [rw] create_rule

The creation rule.
@return [Types::CreateRule]

@!attribute [rw] retain_rule

The retention rule.
@return [Types::RetainRule]

@!attribute [rw] fast_restore_rule

The rule for enabling fast snapshot restore.
@return [Types::FastRestoreRule]

@!attribute [rw] cross_region_copy_rules

The rule for cross-Region snapshot copies.

You can only specify cross-Region copy rules for policies that
create snapshots in a Region. If the policy creates snapshots on an
Outpost, then you cannot copy the snapshots to a Region or to an
Outpost. If the policy creates snapshots in a Region, then snapshots
can be copied to up to three Regions or Outposts.
@return [Array<Types::CrossRegionCopyRule>]

@!attribute [rw] share_rules

The rule for sharing snapshots with other Amazon Web Services
accounts.
@return [Array<Types::ShareRule>]

@!attribute [rw] deprecate_rule

The AMI deprecation rule for the schedule.
@return [Types::DeprecateRule]

@see docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12/Schedule AWS API Documentation

Constants

SENSITIVE