tencent cloud

Bucket Tag Overview
Last updated: 2025-09-24 17:45:28
Bucket Tag Overview
Last updated: 2025-09-24 17:45:28

Overview

A bucket tag is a key-value pair (key = value), which is comprised of a tag key and a tag value that are connected by an equal sign ("="), for example: group = IT. It can be used to manage buckets in groups. You can set, query, and delete the tag for a specified bucket.

Specifications and Limits

Limits on Tag Keys

A tag key starting with "qcs:" or "project" is a default tag key and cannot be created.
A tag key can only contain characters encoded in UTF-8, spaces, numbers, or special characters including + - = . _ : / @.
A tag key should be a combination of 1-127 characters encoded in UTF-8.
Tag keys are case sensitive.

Limits on Tag Values

A tag value can only contain characters encoded in UTF-8, spaces, numbers, or special characters including + - = . _ : / @.
A tag value should be a combination of 1-255 characters encoded in UTF-8.
Tag values are case sensitive.

Limits on the Number of Tags

Bucket dimension: A resource has at most 50 different bucket tags.
Tag dimension:
A user has at most 1,000 different keys.
A key has at most 1,000 values.
Multiple same keys are not allowed in the same bucket.

Usage

You can set bucket tags via the console, APIs/SDKs, or tools.

Using the COS Console

Adding a Tag When Creating a Bucket

You can add a bucket tag when creating a bucket, as shown in the following figure:


Adding a Tag to an Existing Bucket

If you did not add tags when you created the bucket, you can follow the steps below to add tags to the bucket.
1. On the bucket list page, find the bucket you need to add a tag to, click its name, and go to the bucket configuration page.
2. Click on the left Basic Configurations, scroll down the page to find the Tagging configuration item, and click Add Tags.

The configuration items are described as follows:
Tag keys: case-sensitive, support characters such as Chinese, a-z, A-Z, 0-9, +, -, _, =, /, ., :, @.
Tag values: case-sensitive, support characters such as Chinese, a-z, A-Z, 0-9, +, -, _, =, /, ., :, @.
Note:
A bucket can have a maximum of 50 tags, and tag keys cannot be repeated.
3. After entering the tag key and tag value, click Save to complete adding a bucket tag.

Using REST API/SDK

You can use the following APIs to manage bucket tags directly:
You can manage bucket tags directly using the following SDK:

Tools

Manage bucket tags directly using the following tools:
COSCLI


Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback