You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::DLM::Types::PolicyDetails

Inherits:
Struct
  • Object
show all
Defined in:
(unknown)

Overview

Note:

When passing PolicyDetails as input to an Aws::Client method, you can use a vanilla Hash:

{
  policy_type: "EBS_SNAPSHOT_MANAGEMENT", # accepts EBS_SNAPSHOT_MANAGEMENT, IMAGE_MANAGEMENT
  resource_types: ["VOLUME"], # accepts VOLUME, INSTANCE
  target_tags: [
    {
      key: "String", # required
      value: "String", # required
    },
  ],
  schedules: [
    {
      name: "ScheduleName",
      copy_tags: false,
      tags_to_add: [
        {
          key: "String", # required
          value: "String", # required
        },
      ],
      variable_tags: [
        {
          key: "String", # required
          value: "String", # required
        },
      ],
      create_rule: {
        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", # required
          encrypted: false, # required
          cmk_arn: "CmkArn",
          copy_tags: false,
          retain_rule: {
            interval: 1,
            interval_unit: "DAYS", # accepts DAYS, WEEKS, MONTHS, YEARS
          },
        },
      ],
    },
  ],
  parameters: {
    exclude_boot_volume: false,
    no_reboot: false,
  },
}

Specifies the configuration of a lifecycle policy.

Returned by:

Instance Attribute Summary collapse

Instance Attribute Details

#parametersTypes::Parameters

A set of optional parameters for the policy.

Returns:

#policy_typeString

The valid target resource types and actions a policy can manage. Specify EBS_SNAPSHOT_MANAGEMENT to create a lifecycle policy that manages the lifecycle of Amazon EBS snapshots. Specify IMAGE_MANAGEMENT to create a lifecycle policy that manages the lifecycle of EBS-backed AMIs. The default is EBS_SNAPSHOT_MANAGEMENT.

Possible values:

  • EBS_SNAPSHOT_MANAGEMENT
  • IMAGE_MANAGEMENT

Returns:

  • (String)

    The valid target resource types and actions a policy can manage.

#resource_typesArray<String>

The resource type. Use VOLUME to create snapshots of individual volumes or use INSTANCE to create multi-volume snapshots from the volumes for an instance.

Returns:

  • (Array<String>)

    The resource type.

#schedulesArray<Types::Schedule>

The schedules of policy-defined actions. A policy can have up to four schedules - one mandatory schedule and up to three optional schedules.

Returns:

#target_tagsArray<Types::Tag>

The single tag that identifies targeted resources for this policy.

Returns:

  • (Array<Types::Tag>)

    The single tag that identifies targeted resources for this policy.