Difference between revisions of "Aws dlm create-lifecycle-policy"
Jump to navigation
Jump to search
(4 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
* https://awscli.amazonaws.com/v2/documentation/api/latest/reference/dlm/create-lifecycle-policy.html | * https://awscli.amazonaws.com/v2/documentation/api/latest/reference/dlm/create-lifecycle-policy.html | ||
* <code>[[aws dlm]] create-lifecycle-policy</code> | * <code>[[aws dlm]] create-lifecycle-policy</code> | ||
+ | |||
+ | == Official example == | ||
+ | |||
+ | { | ||
+ | "PolicyType": "[[EBS_SNAPSHOT_MANAGEMENT]]"|"[[IMAGE_MANAGEMENT]]"|"[[EVENT_BASED_POLICY]]", | ||
+ | "ResourceTypes": ["VOLUME"|"INSTANCE", ...], | ||
+ | "ResourceLocations": ["CLOUD"|"OUTPOST", ...], | ||
+ | "TargetTags": [ | ||
+ | { | ||
+ | "Key": "string", | ||
+ | "Value": "string" | ||
+ | } | ||
+ | ... | ||
+ | ], | ||
+ | <pre> | ||
+ | "Schedules": [ | ||
+ | { | ||
+ | "Name": "string", | ||
+ | "CopyTags": true|false, | ||
+ | "TagsToAdd": [ | ||
+ | { | ||
+ | "Key": "string", | ||
+ | "Value": "string" | ||
+ | } | ||
+ | ... | ||
+ | ], | ||
+ | "VariableTags": [ | ||
+ | { | ||
+ | "Key": "string", | ||
+ | "Value": "string" | ||
+ | } | ||
+ | ... | ||
+ | ], | ||
+ | "CreateRule": { | ||
+ | "Location": "CLOUD"|"OUTPOST_LOCAL", | ||
+ | "Interval": integer, | ||
+ | "IntervalUnit": "HOURS", | ||
+ | "Times": ["string", ...], | ||
+ | "CronExpression": "string" | ||
+ | }, | ||
+ | "RetainRule": { | ||
+ | "Count": integer, | ||
+ | "Interval": integer, | ||
+ | "IntervalUnit": "DAYS"|"WEEKS"|"MONTHS"|"YEARS" | ||
+ | }, | ||
+ | "FastRestoreRule": { | ||
+ | "Count": integer, | ||
+ | "Interval": integer, | ||
+ | "IntervalUnit": "DAYS"|"WEEKS"|"MONTHS"|"YEARS", | ||
+ | "AvailabilityZones": ["string", ...] | ||
+ | }, | ||
+ | "CrossRegionCopyRules": [ | ||
+ | { | ||
+ | "TargetRegion": "string", | ||
+ | "Target": "string", | ||
+ | "Encrypted": true|false, | ||
+ | "CmkArn": "string", | ||
+ | "CopyTags": true|false, | ||
+ | "RetainRule": { | ||
+ | "Interval": integer, | ||
+ | "IntervalUnit": "DAYS"|"WEEKS"|"MONTHS"|"YEARS" | ||
+ | }, | ||
+ | "DeprecateRule": { | ||
+ | "Interval": integer, | ||
+ | "IntervalUnit": "DAYS"|"WEEKS"|"MONTHS"|"YEARS" | ||
+ | } | ||
+ | } | ||
+ | ... | ||
+ | ], | ||
+ | "ShareRules": [ | ||
+ | { | ||
+ | "TargetAccounts": ["string", ...], | ||
+ | "UnshareInterval": integer, | ||
+ | "UnshareIntervalUnit": "DAYS"|"WEEKS"|"MONTHS"|"YEARS" | ||
+ | } | ||
+ | ... | ||
+ | ], | ||
+ | "DeprecateRule": { | ||
+ | "Count": integer, | ||
+ | "Interval": integer, | ||
+ | "IntervalUnit": "DAYS"|"WEEKS"|"MONTHS"|"YEARS" | ||
+ | }, | ||
+ | "ArchiveRule": { | ||
+ | "RetainRule": { | ||
+ | "RetentionArchiveTier": { | ||
+ | "Count": integer, | ||
+ | "Interval": integer, | ||
+ | "IntervalUnit": "DAYS"|"WEEKS"|"MONTHS"|"YEARS" | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | ... | ||
+ | ], | ||
+ | "Parameters": { | ||
+ | "ExcludeBootVolume": true|false, | ||
+ | "NoReboot": true|false, | ||
+ | "ExcludeDataVolumeTags": [ | ||
+ | { | ||
+ | "Key": "string", | ||
+ | "Value": "string" | ||
+ | } | ||
+ | ... | ||
+ | ] | ||
+ | }, | ||
+ | "EventSource": { | ||
+ | "Type": "MANAGED_CWE", | ||
+ | "Parameters": { | ||
+ | "EventType": "shareSnapshot", | ||
+ | "SnapshotOwner": ["string", ...], | ||
+ | "DescriptionRegex": "string" | ||
+ | } | ||
+ | }, | ||
+ | "Actions": [ | ||
+ | { | ||
+ | "Name": "string", | ||
+ | "CrossRegionCopy": [ | ||
+ | { | ||
+ | "Target": "string", | ||
+ | "EncryptionConfiguration": { | ||
+ | "Encrypted": true|false, | ||
+ | "CmkArn": "string" | ||
+ | }, | ||
+ | "RetainRule": { | ||
+ | "Interval": integer, | ||
+ | "IntervalUnit": "DAYS"|"WEEKS"|"MONTHS"|"YEARS" | ||
+ | } | ||
+ | } | ||
+ | ... | ||
+ | ] | ||
+ | } | ||
+ | ... | ||
+ | ] | ||
+ | } | ||
+ | |||
+ | </pre> | ||
== Related == | == Related == | ||
− | * [[Terraform resource: | + | * [[Terraform resource]]: <code>[[Terraform resource: aws_dlm_lifecycle_policy|aws_dlm_lifecycle_policy]]</code> |
== See also == | == See also == |
Latest revision as of 08:54, 13 February 2023
- https://awscli.amazonaws.com/v2/documentation/api/latest/reference/dlm/create-lifecycle-policy.html
aws dlm create-lifecycle-policy
Official example[edit]
{ "PolicyType": "EBS_SNAPSHOT_MANAGEMENT"|"IMAGE_MANAGEMENT"|"EVENT_BASED_POLICY", "ResourceTypes": ["VOLUME"|"INSTANCE", ...], "ResourceLocations": ["CLOUD"|"OUTPOST", ...], "TargetTags": [ { "Key": "string", "Value": "string" } ... ],
"Schedules": [ { "Name": "string", "CopyTags": true|false, "TagsToAdd": [ { "Key": "string", "Value": "string" } ... ], "VariableTags": [ { "Key": "string", "Value": "string" } ... ], "CreateRule": { "Location": "CLOUD"|"OUTPOST_LOCAL", "Interval": integer, "IntervalUnit": "HOURS", "Times": ["string", ...], "CronExpression": "string" }, "RetainRule": { "Count": integer, "Interval": integer, "IntervalUnit": "DAYS"|"WEEKS"|"MONTHS"|"YEARS" }, "FastRestoreRule": { "Count": integer, "Interval": integer, "IntervalUnit": "DAYS"|"WEEKS"|"MONTHS"|"YEARS", "AvailabilityZones": ["string", ...] }, "CrossRegionCopyRules": [ { "TargetRegion": "string", "Target": "string", "Encrypted": true|false, "CmkArn": "string", "CopyTags": true|false, "RetainRule": { "Interval": integer, "IntervalUnit": "DAYS"|"WEEKS"|"MONTHS"|"YEARS" }, "DeprecateRule": { "Interval": integer, "IntervalUnit": "DAYS"|"WEEKS"|"MONTHS"|"YEARS" } } ... ], "ShareRules": [ { "TargetAccounts": ["string", ...], "UnshareInterval": integer, "UnshareIntervalUnit": "DAYS"|"WEEKS"|"MONTHS"|"YEARS" } ... ], "DeprecateRule": { "Count": integer, "Interval": integer, "IntervalUnit": "DAYS"|"WEEKS"|"MONTHS"|"YEARS" }, "ArchiveRule": { "RetainRule": { "RetentionArchiveTier": { "Count": integer, "Interval": integer, "IntervalUnit": "DAYS"|"WEEKS"|"MONTHS"|"YEARS" } } } } ... ], "Parameters": { "ExcludeBootVolume": true|false, "NoReboot": true|false, "ExcludeDataVolumeTags": [ { "Key": "string", "Value": "string" } ... ] }, "EventSource": { "Type": "MANAGED_CWE", "Parameters": { "EventType": "shareSnapshot", "SnapshotOwner": ["string", ...], "DescriptionRegex": "string" } }, "Actions": [ { "Name": "string", "CrossRegionCopy": [ { "Target": "string", "EncryptionConfiguration": { "Encrypted": true|false, "CmkArn": "string" }, "RetainRule": { "Interval": integer, "IntervalUnit": "DAYS"|"WEEKS"|"MONTHS"|"YEARS" } } ... ] } ... ] }
Related[edit]
See also[edit]
Advertising: