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 fine-grained manner. You can use tags in scenarios such as collecting cost statistics and performing O&M monitoring for resources. This topic describes how to create or add tags to resources in the ECS console.
Limits
For information about the 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
Log on to the ECS console.
In the left-side navigation pane, click Tags.
In the top navigation bar, select the region and resource group to which the resource belongs.
On the Custom Tags tab, click Create Custom Tags.
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 a time, and each custom tag key must be unique. If you want to create tags but do not want to add the tags to resources, create the tags as preset tags. For more information, see Create a preset tag.
Create or select tags.
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.
NoteIf 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.
You can search for an existing tag key that you want to add. Fuzzy search is supported. Up to 10 tag keys can be added at a time.
Tag value
No
Enter a new tag value or select an existing tag value.
NoteIf 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.
You can search for an existing tag value that you want to add. Fuzzy search is supported. Up to 10 tag values can be added at a time.
Click Next.
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.
NoteYou 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: Instance, Disk, or Snapshot.
Elastic Compute Service:instance
Resource ID
Enter the IDs of ECS instances in the Resource ID field.
i-bp12d03u8usvakpo****
Click OK.
(Optional) View the associated resources of the tags.
After the tags are created and added to resources, click the icon in the upper-right corner of the Custom Tags tab to view the tags. In the Actions column corresponding to a tag, click View Resources to view the resources associated with the tag.