Tags can be used to identify resources. Tags allow enterprises and individuals to categorize their ECS resources and simplify the search and management of resources.
Tags can make your search more efficient and allow you to perform batch operations on resources. For example:
- You can bind different tags to environments such as production and test environments,
operating systems such as Windows and Linux, and mobile platforms such as iOS and
Android. For example, create the
Test:Server-Windowstag and bind this tag to all the Windows ECS instances that are in the test environment. You can find these instances based on the tag and perform batch operations on these instances.
Examples of batch operations:
- Replace the image to deploy applications.
- Upgrade patches.
- Create security group rules to control access.
- Use Operation Orchestration Service (OOS) to batch start, stop, or restart ECS instances.
- Use Cloud Assistant to run an O&M script on multiple ECS instances.
- In team or project management, you can add tags such as
CostCenter:aliyunto groups, projects, or departments. Then, you can categorize the objects, and implement itemized billing and cross authorization based on tags on the Billing Management page of the ECS console.
For more information, see the following topics:
- Each tag consists of a key-value pair.
- A tag must have a unique tag key.
For example, an ECS instance is bound to the
city:shanghaitag. If the instance is subsequently bound to the
city:shanghaitag is automatically unbound from the instance.
- Tag information is not shared across regions. For example, tags created in the China (Hangzhou) region are not visible to the China (Shanghai) region.
- Tags are deleted when they are not bound to any resources.
- For more information about the best practices for tag design, see Best practices for tag design.
For more information about limits and quotas of tags, see the "Tag limits" section in Limits.
Services that support tags
The following table lists Alibaba Cloud services and resources that support tags.
|Elastic Compute Service (ECS)||
|Auto Scaling||Scaling group|
|Virtual Private Cloud (VPC)||
|ApsaraDB for Redis||ApsaraDB for Redis instance|
|Alibaba Cloud Content Delivery Network (CDN)||Domain name|
|Key Management Service (KMS)||Customer master key (CMK)|
|Object Storage Service (OSS)||Bucket||Add, delete, modify, or query tags for a bucket: bucket-tagging|
|ApsaraDB for RDS||ApsaraDB for RDS instance|
|AnalyticDB for PostgreSQL||AnalyticDB for PostgreSQL instance||Query resources based on tags: DescribeDBInstances|
|Cloud Enterprise Network (CEN)||CEN instance|
|Smart Access Gateway (SAG)||Cloud Connect Network (CCN)||Query resources based on tags: DescribeCloudConnectNetworks|
|Cloud Security Scanner||Assets|
|Apsara File Storage NAS||File system|
|Operation Orchestration Service (OOS)||