Difference between revisions of "Aws dlm create-lifecycle-policy"

From wikieduonline
Jump to navigation Jump to search
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{lowercase}}
 
{{lowercase}}
 
* 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
[[aws dlm]] create-lifecycle-policy
+
* <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 ==
 +
* [[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

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: