Updated on 2025-04-11 GMT+08:00

Overview

What Is a Tag

A tag is an identifier you assign to a cloud resource. When you have many cloud resources, you can use tags to categorize them in different ways (for example, by purpose, owner, or environment).

In SWR Enterprise Edition, you can use tags to identify repositories or namespaces so that you can find and manage them easier.

Application Scenarios

You can use tags to facilitate the following operations:

  • Central management of resources

    If you have a lot of cloud resources, you can use tags to quickly identify resources of the same type to check, modify, or delete them.

  • Resource migration

    You can define a tag to identify the resources to be migrated. This improves migration efficiency and avoids errors caused by repeatedly creating tags.

  • Custom billing

    In a billing system, to collect and analyze bills faster and more precisely, you can query resources with specific tags.

Naming Rules

Each tag consists of a key and a value. For each resource, their tag keys must be unique, and each tag key can have only one tag value. If the tag value you add is the same as an existing one for the resource, the new value overwrites the old one.

Table 1 Key and value

Parameter

Rule

Example

Key

  • Cannot be omitted.
  • Cannot start with _sys_.
  • Contains 1 to 128 characters.
  • Consists of letters, digits, underscores (_), and hyphens (-).
  • Can contain UTF-8 letters, digits, spaces, and the following characters: _.:=+-@

Test Department

Value

  • Can be omitted.
  • Cannot be empty or null for a predefined tag.
  • Contains 0 to 255 characters.
  • Consists of letters, digits, underscores (_), and hyphens (-).
  • Can contain UTF-8 letters, digits, spaces, and the following characters: _.:/=+-@

Shanghai