Queries the versioning status of a bucket.
Usage notes
To query the versioning status of a bucket, you must have the oss:GetBucketVersioning permission. For more information, see Attach a custom policy to a RAM user.
Command syntax
ossutil api get-bucket-versioning --bucket value [flags]Parameter | Type | Description |
--bucket | string | The name of the bucket. |
Note
For more information, see Command-line options.
Examples
Query the versioning status of a bucket named examplebucket.
ossutil api get-bucket-versioning --bucket examplebucketQuery the versioning status of a bucket named examplebucket and format the output in JSON.
ossutil api get-bucket-versioning --bucket examplebucket --output-format jsonQuery the versioning status of a bucket named examplebucket and format the output in YAML.
ossutil api get-bucket-versioning --bucket examplebucket --output-format yaml