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.
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.
Log on to the ECS console.
In the left-side navigation pane, click Tags.
In the upper-left corner of the top navigation bar, select a region.
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 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.
Create or select tags.
Configure the parameters that are described in the following table.
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.
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.
Add the tags to resources.
Configure the parameters described in the following table.
Method to Specify Resources
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
Select a resource type of a service. Example: ECS instances, disks, or snapshots.
Elastic Compute Service:instance
Enter the IDs of ECS instances in the Resource ID field.
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 the tags, click View Resources to view the associated resources.