If you have multiple Elastic Compute Service (ECS) resources of different types that are associated with each other within your account, you can add tags to these 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 top navigation bar, select a region.
  4. On the Custom Tags tab, click Create Custom Tags.
  5. On 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 tags or select existing tags.
      tag

      Configure the parameters 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.
      resource

      Configure the parameters described in the following table.

      Parameter Description Example
      Service Select a resource type of a service. Example: ECS instances, disks, or snapshots. Elastic Compute Service:instance
      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.
      • Method to Specify Resources: Select from Resource List.
      • Resource: i-bp12d03u8usvakpo****
    4. Click OK.
    5. In the message that appears, click Close.

Result

After the tags are created and added to resources, click the tag1 icon above the right-side custom tag list to view the added tags. Click View Resources in the Actions column corresponding to the tags to view their associated resources.

check resource