Queries the versioning status of a bucket.
Prerequisites
Before you begin, ensure that you have:
The
oss:GetBucketVersioningpermission. For details, see Attach a custom policy to a RAM user.
Syntax
ossutil api get-bucket-versioning --bucket <value> [flags]Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
--bucket | string | Yes | The name of the bucket. |
For global flags, see Command-line options.
Examples
Query the versioning status of examplebucket:
ossutil api get-bucket-versioning --bucket examplebucketQuery the versioning status and format the output as JSON:
ossutil api get-bucket-versioning --bucket examplebucket --output-format jsonQuery the versioning status and format the output as YAML:
ossutil api get-bucket-versioning --bucket examplebucket --output-format yaml