404

[ Avaa Bypassed ]




Upload:

Command:

botdev@3.136.11.217: ~ $
**To create a lifecycle policy**

The following ``create-lifecycle-policy`` example creates a lifecycle policy that creates a daily snapshot of volumes at the specified time. The specified tags are added to the snapshots, and tags are also copied from the volume and added to the snapshots. If creating a new snapshot exceeds the specified maximum count, the oldest snapshot is deleted. ::

    aws dlm create-lifecycle-policy \
        --description "My first policy" \
        --state ENABLED \
        --execution-role-arn arn:aws:iam::12345678910:role/AWSDataLifecycleManagerDefaultRole \
        --policy-details file://policyDetails.json
  
Contents of ``policyDetails.json``::

    {
        "ResourceTypes": [
            "VOLUME"
        ],
        "TargetTags": [
            {
                "Key": "costCenter",
                "Value": "115"
            }
        ],
        "Schedules":[
            {
                "Name": "DailySnapshots",
                "CopyTags": true,
                "TagsToAdd": [
                    {
                        "Key": "type",
                         "Value": "myDailySnapshot"
                    }
                ],
                "CreateRule": {
                    "Interval": 24,
                    "IntervalUnit": "HOURS",
                    "Times": [
                        "03:00"
                    ]
                },
                "RetainRule": {
                    "Count":5
                }
            }
        ]
    }

Output::

    {
        "PolicyId": "policy-0123456789abcdef0"
    }

Filemanager

Name Type Size Permission Actions
create-default-role.rst File 521 B 0644
create-lifecycle-policy.rst File 1.54 KB 0644
delete-lifecycle-policy.rst File 170 B 0644
get-lifecycle-policies.rst File 399 B 0644
get-lifecycle-policy.rst File 1.65 KB 0644
update-lifecycle-policy.rst File 1.14 KB 0644