Getting Information About Bucket Versioning
You can get information about the state of the bucket versioning.
If you have ever enabled versioning, this action returns information as shown below. If you have never enabled it, this action does not return any information.
Getting Information About Bucket Versioning Using AWS CLI
Before you begin: Install and configure AWS CLI. For more information, see Installing and Configuring AWS CLI. |
To get information about the versioning of your bucket, use the get-bucket-versioning command following this syntax:
$ aws s3api get-bucket-versioning \
--profile YOUR_PROFILE \
--bucket BUCKET \
--endpoint https://oos.eu-west-2.outscale.com
This command contains the following attributes that you need to specify:
-
(optional)
profile
: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI. -
bucket
: The name of the bucket about which you want to obtain versioning information. -
endpoint
: The endpoint corresponding to the Region you want to send the request to. For more information, see Installing and Configuring AWS CLI.
The get-bucket-versioning command returns the following element:
-
Status
: The state of the versioning (Enabled
|Suspended
).
{
"Status": "Enabled"
}
Related Page
AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.