aws s3api get-bucket-versioning
This operation is not supported for directory buckets. AWS CLI reference
1 example 2 options Its page in the AWS CLI reference
Examples
To retrieve the versioning configuration of a bucket
The following get-bucket-versioning example retrieves the versioning configuration for a bucket named amzn-s3-demo-bucket.
aws s3api get-bucket-versioning --bucket amzn-s3-demo-bucketIdentify--bucketThe name of the bucket for which to get the versioning information.Its output
{
"Status": "Enabled"
}For more information, see Retaining multiple versions of objects with S3 Versioning in the Amazon S3 User Guide.
Options
--bucketThe name of the bucket for which to get the versioning information.--expected-bucket-ownerThe account ID of the expected bucket owner.