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

From wikieduonline
Jump to navigation Jump to search
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3api/get-bucket-lifecycle-configuration.html
+
{{lowercase}}
 +
* https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3api/get-bucket-lifecycle-configuration.html
  
 +
[[aws s3api]] get-bucket-lifecycle-configuration --bucket NAME
 +
 +
== Examples ==
 +
 +
Example 1:
 +
{
 +
    "Rules": [
 +
        {
 +
            "Expiration": {
 +
                "Days": 3652
 +
            },
 +
            "ID": "cleanup",
 +
            "Filter": {
 +
                "Prefix": ""
 +
            },
 +
            "Status": "Enabled",
 +
            "NoncurrentVersionExpiration": {
 +
                "NoncurrentDays": 1
 +
            }
 +
        }
 +
    ]
 +
}
 +
 +
 +
Example 2:
 +
{
 +
    "Rules": [
 +
        {
 +
            "Expiration": {
 +
                "ExpiredObjectDeleteMarker": false
 +
            },
 +
            "ID": "CleanupIncompleteMultipartUploads",
 +
            "Filter": {},
 +
            "Status": "Enabled",
 +
            "AbortIncompleteMultipartUpload": {
 +
                "DaysAfterInitiation": 14
 +
            }
 +
        },
 +
        {
 +
            "ID": "intelligent-tiering-by-tag",
 +
            "Filter": {
 +
                "Tag": {
 +
                    "Key": "IntelligentTiering",
 +
                    "Value": "1"
 +
                }
 +
            },
 +
            "Status": "Enabled",
 +
            "Transitions": [
 +
                {
 +
                    "Days": 30,
 +
                    "StorageClass": "INTELLIGENT_TIERING"
 +
                }
 +
            ]
 +
        }
 +
    ]
 +
}
 +
 +
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>
 +
 +
 +
 +
[[aws s3api]] get-bucket-lifecycle-configuration --bucket-name NAME
 +
An error occurred (NoSuchLifecycleConfiguration) when calling the GetBucketLifecycleConfiguration operation: The lifecycle configuration does not exist
 +
 +
== Related ==
 +
* [[AWS Glacier]]
 +
* [[aws_s3_bucket_lifecycle_configuration]]
  
 
== See also ==
 
== See also ==

Latest revision as of 12:08, 23 February 2022

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

Examples[edit]

Example 1:

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


Example 2:

{
    "Rules": [
        {
            "Expiration": {
                "ExpiredObjectDeleteMarker": false
            },
            "ID": "CleanupIncompleteMultipartUploads",
            "Filter": {},
            "Status": "Enabled",
            "AbortIncompleteMultipartUpload": {
                "DaysAfterInitiation": 14
            }
        },
        {
            "ID": "intelligent-tiering-by-tag",
            "Filter": {
                "Tag": {
                    "Key": "IntelligentTiering",
                    "Value": "1"
                }
            },
            "Status": "Enabled",
            "Transitions": [
                {
                    "Days": 30,
                    "StorageClass": "INTELLIGENT_TIERING"
                }
            ]
        }
    ]
}

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

Related[edit]

See also[edit]

Advertising: