Bucket Tag Overview

Last Updated At: 2025-10-21 09:10:00

Overview

A bucket tag is a key-value pair (key = value), where the tag key and tag value are connected by an equal sign "=", for example, group = IT. It can be used as an identifier to manage buckets, helping you 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.
  • Tag keys can contain characters encoded in UTF-8, spaces, digits, and special characters including + - = ._ : / @ .
  • A tag key should be a combination of 0-127 characters encoded in UTF-8.
  • Tag keys are case sensitive.

Limits on Tag Values

  • Tag values can contain characters encoded in UTF-8, spaces, digits, and special characters including + - = ._ : / @.
  • A tag value should be a combination of 0-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 can have up to 1,000 different keys.
    • A key has at most 1,000 values.
    • Multiple same keys are not allowed in the same bucket.

Usage Instructions

You can set bucket tags via the console or APIs.

Using the COS Console

If you need to use the COS console to set bucket tags, see Setting Bucket Tags in the document Console Guide.

Using the REST API

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