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

From wikieduonline
Jump to navigation Jump to search
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 ==
 +
<pre>
 +
{
 +
  "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"
 +
          }
 +
        }
 +
        ...
 +
      ]
 +
    }
 +
    ...
 +
  ]
 +
}
 +
 +
</pre>
  
 
== Related ==
 
== Related ==

Revision as of 08:53, 13 February 2023

Official example

{
  "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

See also

Advertising: