All Products
Search
Document Center

Elastic Compute Service:Create or add a tag

Last Updated:Nov 30, 2023

If you have multiple Elastic Compute Service (ECS) resources of different types in your account that are associated with each other, you can add tags to the resources. This allows you to categorize and manage the resources in a centralized manner. This topic describes how to create or add tags to resources in the ECS console.

Background information

  • For information about resources that support tags, see Overview.

  • You can add up to 20 tags to a resource. If the number of tags that are added to a resource reaches the upper limit, you must remove some of the tags before you add new tags.

Procedure

  1. Log on to the ECS console.

  2. In the left-side navigation pane, click Tags.

  3. In the upper-left corner of the top navigation bar, select a region. 地域

  4. On the Custom Tags tab, click Create Custom Tags.

  5. In the Create Custom Tags dialog box, perform the following steps:

    When you create custom tags, you must add the tags to resources. Up to 10 custom tags can be created at the same time, and each custom tag key must be unique. If you want to create tags but not to add them to resources, create the tags as preset tags. For more information, see Create a preset tag.

    1. Create or select tags.

      tag

      Configure the parameters that are described in the following table.

      Parameter

      Required

      Description

      Tag key

      Yes

      Enter a new tag key or select an existing tag key.

      Note

      If you want to create a tag, enter a new tag key. If you want to add an existing tag, select its tag key.

      • Each tag key can be up to 128 characters in length and cannot contain http:// or https://. It cannot start with acs: or aliyun.

      • To add an existing tag, you can search for the tag key by prefix. Up to 10 tag keys can be added at the same time.

      Tag value

      No

      Enter a new tag value or select an existing tag value.

      Note

      If you want to add an existing tag, select its tag value.

      • Each tag value can be up to 128 characters in length and cannot contain http:// or https://. It cannot start with acs: or aliyun.

      • To add an existing tag, you can search for the tag value by prefix. Up to 10 tag values can be added at the same time.

    2. Click Next.

    3. Add the tags to resources.

      Configure the parameters described in the following table.

      Parameter

      Description

      Example

      Method to Specify Resources

      Valid values:

      • Select from Resource List: You can select one or more resources to which you want to add tags from the resource list.

      • Enter Resource IDs: You can enter resource IDs in the Resource ID field.

        Note

        You can enter multiple resource IDs. Separate the IDs with commas (,) or enter the IDs on different lines.

      Enter Resource IDs

      Service

      Select a resource type of a service. Example: ECS instances, disks, or snapshots.

      Elastic Compute Service:instance

      Resource ID

      Enter the IDs of ECS instances in the Resource ID field.

      i-bp12d03u8usvakpo****

    4. Click OK.

Result

After the tags are created and added to resources, click the tag1 icon in the upper-right corner of the Custom Tags tab to view the tags. In the Actions column corresponding to the tags, click View Resources to view the associated resources.

check resource