Help Center/ Document Database Service/ User Guide/ Tags/ Adding or Modifying a Tag
Updated on 2023-03-15 GMT+08:00

Adding or Modifying a Tag

Tags help you identify and manage DDS resources. When there are a large number of instances, you can add tags to them to quickly filter them. An instance can be tagged during or after it is created.

This section describes how to add and modify tags after an instance is created.

Precautions

  • You are advised to set predefined tags on the TMS console.
  • A tag consists of a key and value. You can add only one value for each key. For details about the naming rules of tag keys and tag values, see Table 1.
  • Up to 20 tags can be added for a DB instance.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and a project.
  3. Click in the upper left corner of the page and choose Databases > Document Database Service.
  4. On the Instances page, click the instance name.
  5. In the navigation pane on the left, click Tags.
  6. On the Tags page, click Add Tag. In the displayed dialog box, specify the tag key and value and click OK.

    • Add a predefined tag.

      Predefined tags can be used to identify multiple cloud resources.

      To tag a cloud resource, you can select a created predefined tag from the drop-down list, without entering a key and value for the tag.

      For example, if a predefined tag has been created, its key is test02 and value is Project1. When you configure the key and value for a cloud resource, the created predefined tag will be automatically displayed on the page.

      Figure 1 Adding a predefined tag
    • Create a tag.
      When creating a tag, enter the tag key and value.
      Figure 2 Adding a tag
      Table 1 Naming rules

      Parameter

      Requirement

      Example

      Tag key

      • The key cannot be empty and contains 1 to 128 single-byte characters.
      • The key can contain UTF-8 letters (including Chinese characters), digits, spaces, and the following characters: _.:/=+-@
      • Do not enter labels starting with _sys_, which are system labels.
      • The key can only consist of digits, letters, underscores (_), and hyphens (-).

      Organization

      Tag value

      • The value can contain UTF-8 letters (including Chinese characters), digits, spaces, and the following characters: _.:/=+-@
      • The value can be empty or null and contains 0 to 255 single-byte characters.
      • The value can only consist of digits, letters, underscores (_), periods (.), and hyphens (-).

      dds_01

  7. View and manage tags on the Tags page.

    You can click Edit in the Operation column to change the tag value.

    Only the tag value can be edited when editing a tag.

    Figure 3 Tag added