get-bucket-lifecycle-configuration

Prev Next

Available in Classic and VPC

Get the lifecycle rule registered in a Ncloud Storage bucket.

Note

For a Sub Account user to execute this command, they must have the View/GetLifecycleConfiguration action permission.

Syntax

The get-bucket-lifecycle-configuration syntax is as follows:

aws s3api get-bucket-lifecycle-configuration \
    --bucket <bucket> \
    --endpoint-url <endpoint-url>

Options

This section describes the options available when running get-bucket-lifecycle-configuration.

Required options

The following options are required for get-bucket-lifecycle-configuration.

Options Type Required Description
--bucket String Required Bucket name

Common options

For information about the options common to all aws subcommands, see Ncloud Storage options.

Examples

If the request to retrieve lifecycle rules is successful, the application conditions and status of each rule registered in the bucket are returned.

Command

The command example is as follows:

aws s3api get-bucket-lifecycle-configuration --bucket my-test-bucket \
    --endpoint-url=https://kr.ncloudstorage.com

Output

The output example is as follows:

{
    "Rules": [
        {
            "Expiration": {
                "Days": 30
            },
            "ID": "expire-old-logs",
            "Filter": {
                "Prefix": "logs/"
            },
            "Status": "Enabled"
        }
    ]
}

Related commands

Related commands are as follows: