Retrieves the tags configured for a bucket.
Usage notes
By default, an Alibaba Cloud account has the permissions to query the tags of a bucket. To run this command as a RAM user or using Security Token Service (STS), attach a policy that grants the oss:GetBucketTags permission. For details, see Attach a custom policy to a RAM user.
Syntax
ossutil api get-bucket-tags --bucket <value> [flags]Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
--bucket | string | Yes | The name of the bucket. |
For global flags supported by all ossutil commands, see Global command-line options.
This command maps to the GetBucketTags API operation. For the full parameter reference, see GetBucketTags.
Examples
Get bucket tags (default output)
ossutil api get-bucket-tags --bucket examplebucketGet bucket tags in JSON format
ossutil api get-bucket-tags --bucket examplebucket --output-format jsonGet bucket tags in YAML format
ossutil api get-bucket-tags --bucket examplebucket --output-format yaml