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

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-dlm/lib/aws-sdk-dlm/types.rb

Overview

Note:

When making an API call, you may pass PolicyDetails data as a hash:

{
  policy_type: "EBS_SNAPSHOT_MANAGEMENT", # accepts EBS_SNAPSHOT_MANAGEMENT, IMAGE_MANAGEMENT, EVENT_BASED_POLICY
  resource_types: ["VOLUME"], # accepts VOLUME, INSTANCE
  resource_locations: ["CLOUD"], # accepts CLOUD, OUTPOST
  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: {
        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
      },
    },
  ],
  parameters: {
    exclude_boot_volume: false,
    no_reboot: false,
  },
  event_source: {
    type: "MANAGED_CWE", # required, accepts MANAGED_CWE
    parameters: {
      event_type: "shareSnapshot", # required, accepts shareSnapshot
      snapshot_owner: ["AwsAccountId"], # required
      description_regex: "DescriptionRegex", # required
    },
  },
  actions: [
    {
      name: "ActionName", # required
      cross_region_copy: [ # required
        {
          target: "Target", # required
          encryption_configuration: { # required
            encrypted: false, # required
            cmk_arn: "CmkArn",
          },
          retain_rule: {
            interval: 1,
            interval_unit: "DAYS", # accepts DAYS, WEEKS, MONTHS, YEARS
          },
        },
      ],
    },
  ],
}

Specifies the configuration of a lifecycle policy.

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#actionsArray<Types::Action>

The actions to be performed when the event-based policy is triggered. You can specify only one action per policy.

This parameter is required for event-based policies only. If you are creating a snapshot or AMI policy, omit this parameter.

Returns:



1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
# File 'gems/aws-sdk-dlm/lib/aws-sdk-dlm/types.rb', line 1193

class PolicyDetails < Struct.new(
  :policy_type,
  :resource_types,
  :resource_locations,
  :target_tags,
  :schedules,
  :parameters,
  :event_source,
  :actions)
  SENSITIVE = []
  include Aws::Structure
end

#event_sourceTypes::EventSource

The event that triggers the event-based policy.

This parameter is required for event-based policies only. If you are creating a snapshot or AMI policy, omit this parameter.

Returns:



1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
# File 'gems/aws-sdk-dlm/lib/aws-sdk-dlm/types.rb', line 1193

class PolicyDetails < Struct.new(
  :policy_type,
  :resource_types,
  :resource_locations,
  :target_tags,
  :schedules,
  :parameters,
  :event_source,
  :actions)
  SENSITIVE = []
  include Aws::Structure
end

#parametersTypes::Parameters

A set of optional parameters for snapshot and AMI lifecycle policies.

This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.

Returns:



1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
# File 'gems/aws-sdk-dlm/lib/aws-sdk-dlm/types.rb', line 1193

class PolicyDetails < Struct.new(
  :policy_type,
  :resource_types,
  :resource_locations,
  :target_tags,
  :schedules,
  :parameters,
  :event_source,
  :actions)
  SENSITIVE = []
  include Aws::Structure
end

#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. Specify EVENT_BASED_POLICY to create an event-based policy that performs specific actions when a defined event occurs in your Amazon Web Services account.

The default is EBS_SNAPSHOT_MANAGEMENT.

Returns:

  • (String)


1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
# File 'gems/aws-sdk-dlm/lib/aws-sdk-dlm/types.rb', line 1193

class PolicyDetails < Struct.new(
  :policy_type,
  :resource_types,
  :resource_locations,
  :target_tags,
  :schedules,
  :parameters,
  :event_source,
  :actions)
  SENSITIVE = []
  include Aws::Structure
end

#resource_locationsArray<String>

The location of the resources to backup. If the source resources are located in an Amazon Web Services Region, specify CLOUD. If the source resources are located on an Outpost in your account, specify OUTPOST.

If you specify OUTPOST, Amazon Data Lifecycle Manager backs up all resources of the specified type with matching target tags across all of the Outposts in your account.

Returns:

  • (Array<String>)


1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
# File 'gems/aws-sdk-dlm/lib/aws-sdk-dlm/types.rb', line 1193

class PolicyDetails < Struct.new(
  :policy_type,
  :resource_types,
  :resource_locations,
  :target_tags,
  :schedules,
  :parameters,
  :event_source,
  :actions)
  SENSITIVE = []
  include Aws::Structure
end

#resource_typesArray<String>

The target resource type for snapshot and AMI lifecycle policies. Use VOLUMEto create snapshots of individual volumes or use INSTANCE to create multi-volume snapshots from the volumes for an instance.

This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.

Returns:

  • (Array<String>)


1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
# File 'gems/aws-sdk-dlm/lib/aws-sdk-dlm/types.rb', line 1193

class PolicyDetails < Struct.new(
  :policy_type,
  :resource_types,
  :resource_locations,
  :target_tags,
  :schedules,
  :parameters,
  :event_source,
  :actions)
  SENSITIVE = []
  include Aws::Structure
end

#schedulesArray<Types::Schedule>

The schedules of policy-defined actions for snapshot and AMI lifecycle policies. A policy can have up to four schedules—one mandatory schedule and up to three optional schedules.

This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.

Returns:



1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
# File 'gems/aws-sdk-dlm/lib/aws-sdk-dlm/types.rb', line 1193

class PolicyDetails < Struct.new(
  :policy_type,
  :resource_types,
  :resource_locations,
  :target_tags,
  :schedules,
  :parameters,
  :event_source,
  :actions)
  SENSITIVE = []
  include Aws::Structure
end

#target_tagsArray<Types::Tag>

The single tag that identifies targeted resources for this policy.

This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.

Returns:



1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
# File 'gems/aws-sdk-dlm/lib/aws-sdk-dlm/types.rb', line 1193

class PolicyDetails < Struct.new(
  :policy_type,
  :resource_types,
  :resource_locations,
  :target_tags,
  :schedules,
  :parameters,
  :event_source,
  :actions)
  SENSITIVE = []
  include Aws::Structure
end