Updated on 2024-06-13 GMT+08:00

Managing Security Group Tags

Scenarios

Tags help you identify, classify, and search for security groups. You can refer to the following sections to manage the tags of a security group.

Table 1 lists the details about a security group tag.

Table 1 Security group tag naming requirements

Parameter

Requirements

Example Value

Tag key

  • For each security group, 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 consist of letters, digits, underscores (_), and hyphens (-).

test

Tag value

  • Can be left blank.
  • Can contain a maximum of 256 characters.
  • Can consist of letters, digits, underscores (_), periods (.), and hyphens (-).

01

Notes and Constraints

  • Each tag consists of a tag key and a tag value. Only the tag value can be edited.

    If you want to change the tag key, delete it and add one again.

  • Each cloud resource can have a maximum of 20 tags.

Adding a Tag to a Security Group

  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 Access Control > Security Groups.

    The security group list is displayed.

  5. Locate the target security group and click its name.

    The security group details page is displayed.

  6. On the Tags tab, click Add Tag in the upper left corner of the tag list.

    The Add Tag dialog box is displayed.

  7. Enter the tag key and value as required, and click OK.

    You can view the tag you have added in the tag list.

Modifying a Tag of a Security Group

  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 Access Control > Security Groups.

    The security group list is displayed.

  5. Locate the target security group and click its name.

    The security group details page is displayed.

  6. Click the Tags tab, locate the target tag and click Edit in the Operation column.

    The Edit Tag dialog box is displayed.

  7. Enter the tag value as needed and click OK.

    You can view the edited tag in the tag list.

Deleting a Tag from a Security Group

  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 Access Control > Security Groups.

    The security group list is displayed.

  5. Locate the target security group and click its name.

    The security group details page is displayed.

  6. Click the Tags tab, locate the target tag and click Delete in the Operation column.

    The Delete Tag page is displayed.

  7. Click Yes in the displayed dialog box.

    Return to the tag list, and confirm that the tag has been deleted.