Updated on 2024-07-30 GMT+08:00

Managing Subnet Tags

Scenarios

You can add tags to subnets to help you identify and organize them.

You can add tags when creating a subnet or add tags to existing subnets.

Each cloud resource can have a maximum of 20 tags.

If you have configured tag policies for subnets, you need to add tags to your subnets based on the tag policies. If you add a tag that does not comply with the tag policies, subnets may fail to be created. Contact the administrator to learn more about tag policies.

A tag consists of a key and value pair. Table 1 lists the tag key and value requirements.
Table 1 Subnet tag key and value requirements

Parameter

Requirements

Example Value

Key

  • Cannot be left blank.
  • Must be unique for each subnet.
  • Can contain a maximum of 36 characters.
  • Can contain letters, digits, underscores (_), and hyphens (-).

subnet_key1

Value

  • Can contain a maximum of 43 characters.
  • Can contain letters, digits, underscores (_), periods (.), and hyphens (-).

subnet-01

Procedure

Search for subnets by tag key or value on the subnet list page.
  1. Log in to the management console.
  2. Click in the upper left corner and select the desired region and project.
  3. Click in the upper left corner and choose Networking > Virtual Private Cloud.

    The Virtual Private Cloud page is displayed.

  4. In the navigation pane on the left, choose Virtual Private Cloud > Subnets.

    The Subnets page is displayed.

  5. In the search box above the subnet list, click the search box.

    Click the tag key and then the value as required. The system filters resources based on the tag you select.

Add, delete, edit, and view tags on the Tags tab of a subnet.
  1. Log in to the management console.
  2. Click in the upper left corner and select the desired region and project.
  3. Click in the upper left corner and choose Networking > Virtual Private Cloud.

    The Virtual Private Cloud page is displayed.

  4. In the navigation pane on the left, choose Virtual Private Cloud > Subnets.

    The Subnets page is displayed.

  5. In the subnet list, locate the target subnet and click its name.
  6. On the subnet details page, click the Tags tab and perform desired operations on tags.
    • View tags.

      On the Tags tab, you can view details about tags added to the current subnet, including the number of tags and the key and value of each tag.

    • Add a tag.

      Click Add Tag in the upper left corner. In the displayed Add Tag dialog box, enter the tag key and value, and click OK.

    • Edit a tag.

      Locate the row that contains the tag you want to edit and click Edit in the Operation column. In the Edit Tag dialog box, change the tag value and click OK.

    • Delete a tag.

      Locate the row that contains the tag you want to delete, and click Delete in the Operation column. In the displayed dialog box, click OK.