Updated on 2024-09-02 GMT+08:00

Managing VPC Tags

Scenarios

Tags help you identify, classify, and search for VPCs. You can perform the following operations to manage VPC tags:
  • Add tags to a VPC.
  • Modify a VPC tag.
  • Delete a VPC tag.

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

For details about VPC tag requirements, see Table 1.

Table 1 VPC tag key and value requirements

Parameter

Requirements

Example Value

Key

  • For each resource, each tag key must be unique, and each tag key can only have one tag value.
  • Cannot be left blank.
  • Can contain a maximum of 128 characters.
  • Can contain letters in any language, digits, spaces, underscores (_), periods (.), colons (:), equal signs (=), plus signs (+), minus signs (-), and at signs (@).
  • Cannot start with _sys_ or a space or end with a space.

vpc_key1

Value

  • Can be left blank.
  • Can contain a maximum of 255 characters.
  • Can contain letters in any language, digits, spaces, underscores (_), periods (.), colons (:), slashes (/), equal signs (=), plus signs (+), minus signs (-), and at signs (@).
  • Cannot start or end with a space.

vpc-01

Notes and Constraints

Each cloud resource can have a maximum of 20 tags.

Procedure

  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 VPC list, locate the target VPC and click its name.

    The VPC details page is displayed.

  5. On the Tags tab, click Edit Tag in the upper left corner above the tag list.

    The Edit Tag dialog box is displayed.

  6. Perform the following operations on the tag as required:
    • Adding a tag: Click , enter a tag key and value, and click OK.
    • Modifying a tag: Click next to the target tag key or value, delete the original value, enter a new value, and click OK.
    • Deleting a tag: Click Delete next to the target tag and click OK.