Class: Aws::DLM::Types::PolicyDetails
- Inherits:
-
Struct
- Object
- Struct
- Aws::DLM::Types::PolicyDetails
- Defined in:
- gems/aws-sdk-dlm/lib/aws-sdk-dlm/types.rb
Overview
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
},
},
],
share_rules: [
{
target_accounts: ["AwsAccountId"], # required
unshare_interval: 1,
unshare_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
-
#actions ⇒ Array<Types::Action>
The actions to be performed when the event-based policy is triggered.
-
#event_source ⇒ Types::EventSource
The event that triggers the event-based policy.
-
#parameters ⇒ Types::Parameters
A set of optional parameters for snapshot and AMI lifecycle policies.
-
#policy_type ⇒ String
The valid target resource types and actions a policy can manage.
-
#resource_locations ⇒ Array<String>
The location of the resources to backup.
-
#resource_types ⇒ Array<String>
The target resource type for snapshot and AMI lifecycle policies.
-
#schedules ⇒ Array<Types::Schedule>
The schedules of policy-defined actions for snapshot and AMI lifecycle policies.
-
#target_tags ⇒ Array<Types::Tag>
The single tag that identifies targeted resources for this policy.
Instance Attribute Details
#actions ⇒ Array<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.
1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 |
# File 'gems/aws-sdk-dlm/lib/aws-sdk-dlm/types.rb', line 1089 class PolicyDetails < Struct.new( :policy_type, :resource_types, :resource_locations, :target_tags, :schedules, :parameters, :event_source, :actions) SENSITIVE = [] include Aws::Structure end |
#event_source ⇒ Types::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.
1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 |
# File 'gems/aws-sdk-dlm/lib/aws-sdk-dlm/types.rb', line 1089 class PolicyDetails < Struct.new( :policy_type, :resource_types, :resource_locations, :target_tags, :schedules, :parameters, :event_source, :actions) SENSITIVE = [] include Aws::Structure end |
#parameters ⇒ Types::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.
1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 |
# File 'gems/aws-sdk-dlm/lib/aws-sdk-dlm/types.rb', line 1089 class PolicyDetails < Struct.new( :policy_type, :resource_types, :resource_locations, :target_tags, :schedules, :parameters, :event_source, :actions) SENSITIVE = [] include Aws::Structure end |
#policy_type ⇒ String
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 AWS account.
The default is EBS_SNAPSHOT_MANAGEMENT
.
1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 |
# File 'gems/aws-sdk-dlm/lib/aws-sdk-dlm/types.rb', line 1089 class PolicyDetails < Struct.new( :policy_type, :resource_types, :resource_locations, :target_tags, :schedules, :parameters, :event_source, :actions) SENSITIVE = [] include Aws::Structure end |
#resource_locations ⇒ Array<String>
The location of the resources to backup. If the source resources are
located in an AWS Region, specify CLOUD
. If the source resources
are located on an AWS 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.
1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 |
# File 'gems/aws-sdk-dlm/lib/aws-sdk-dlm/types.rb', line 1089 class PolicyDetails < Struct.new( :policy_type, :resource_types, :resource_locations, :target_tags, :schedules, :parameters, :event_source, :actions) SENSITIVE = [] include Aws::Structure end |
#resource_types ⇒ Array<String>
The target resource type for snapshot and AMI lifecycle policies.
Use VOLUME
to 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.
1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 |
# File 'gems/aws-sdk-dlm/lib/aws-sdk-dlm/types.rb', line 1089 class PolicyDetails < Struct.new( :policy_type, :resource_types, :resource_locations, :target_tags, :schedules, :parameters, :event_source, :actions) SENSITIVE = [] include Aws::Structure end |
#schedules ⇒ Array<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.
1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 |
# File 'gems/aws-sdk-dlm/lib/aws-sdk-dlm/types.rb', line 1089 class PolicyDetails < Struct.new( :policy_type, :resource_types, :resource_locations, :target_tags, :schedules, :parameters, :event_source, :actions) SENSITIVE = [] include Aws::Structure end |
#target_tags ⇒ Array<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.
1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 |
# File 'gems/aws-sdk-dlm/lib/aws-sdk-dlm/types.rb', line 1089 class PolicyDetails < Struct.new( :policy_type, :resource_types, :resource_locations, :target_tags, :schedules, :parameters, :event_source, :actions) SENSITIVE = [] include Aws::Structure end |