Difference between revisions of "Aws s3api get-bucket-lifecycle-configuration"

From wikieduonline
Jump to navigation Jump to search
Line 4: Line 4:
 
  [[aws s3api]] get-bucket-lifecycle-configuration --bucket-name NAME
 
  [[aws s3api]] get-bucket-lifecycle-configuration --bucket-name NAME
  
 +
== Examples ==
 
  {
 
  {
 
     "Rules": [
 
     "Rules": [
Line 21: Line 22:
 
     ]
 
     ]
 
  }
 
  }
 +
 +
Official example:
 +
<pre>
 +
{
 +
    "Rules": [
 +
        {
 +
            "ID": "Move rotated logs to Glacier",
 +
            "Prefix": "rotated/",
 +
            "Status": "Enabled",
 +
            "Transitions": [
 +
                {
 +
                    "Date": "2015-11-10T00:00:00.000Z",
 +
                    "StorageClass": "GLACIER"
 +
                }
 +
            ]
 +
        },
 +
        {
 +
            "Status": "Enabled",
 +
            "Prefix": "",
 +
            "NoncurrentVersionTransitions": [
 +
                {
 +
                    "NoncurrentDays": 0,
 +
                    "StorageClass": "GLACIER"
 +
                }
 +
            ],
 +
            "ID": "Move old versions to Glacier"
 +
        }
 +
    ]
 +
}
 +
</pre>
  
  

Revision as of 10:36, 22 February 2022

aws s3api get-bucket-lifecycle-configuration --bucket-name NAME

Examples

{
    "Rules": [
        {
            "Expiration": {
                "Days": 3652
            },
            "ID": "cleanup",
            "Filter": {
                "Prefix": ""
            },
            "Status": "Enabled",
            "NoncurrentVersionExpiration": {
                "NoncurrentDays": 1
            }
        }
    ]
}

Official example:

{
    "Rules": [
        {
            "ID": "Move rotated logs to Glacier",
            "Prefix": "rotated/",
            "Status": "Enabled",
            "Transitions": [
                {
                    "Date": "2015-11-10T00:00:00.000Z",
                    "StorageClass": "GLACIER"
                }
            ]
        },
        {
            "Status": "Enabled",
            "Prefix": "",
            "NoncurrentVersionTransitions": [
                {
                    "NoncurrentDays": 0,
                    "StorageClass": "GLACIER"
                }
            ],
            "ID": "Move old versions to Glacier"
        }
    ]
}


aws s3api get-bucket-lifecycle-configuration --bucket-name NAME
An error occurred (NoSuchLifecycleConfiguration) when calling the GetBucketLifecycleConfiguration operation: The lifecycle configuration does not exist

See also

Advertising: