Tags are used to identify cloud resources. Tags allow you to categorize, search for, and aggregate cloud resources that have the same characteristics from different dimensions. This facilitates resource management.
You can use tags to perform the following operations:
- Search for resources.
Add tags to resources and search for resources by tag in the Resource Management console or by calling a tag-related API operation. For more information, see Use tags to query cloud resources.
- Implement automated O&M.
Add different tags to environments such as production and test environments, operating systems such as Windows and Linux, or mobile platforms such as iOS and Android. Then, create a template in Operation Orchestration Service (OOS) and execute the template to implement automated O&M for your resources. For more information, see Overview.
- Control access to resources.
You can use tags in Resource Access Management (RAM) to manage the access and operation permissions of RAM users on different resources. For more information, see Create a resource with a specific tag and Use tags to control access to ECS resources.
- Convenience: A unified, visualized console is provided to manage the resources to which tags are added.
- Flexibility: You can add, remove, modify, or query one or more tags in the console or by calling an API operation.
- Visibility: You can use tags to manage separate bills for departments, products, and projects.
A tag consists of a key-value pair.
|custom tag||A custom tag is created by a user. For more information, see Add a custom tag.|
|preset tag||A preset tag is a tag that you create in advance and is available for the resources in all regions. You can create preset tags in the stage of tag planning and add them to specific cloud resources in the stage of tag implementation. The system provides some common built-in types for preset tags. This allows you to quickly plan tag systems. For more information, see Create a preset tag.|
|system tag||A system tag is defined by the system. You can only query system tags. System tags present data relationships in a standard manner. In some specific cases, you can use system tags to assist in processing your business. For example, a cluster is associated with an Elastic Compute Service (ECS) instance, and the system adds the system tag of the cluster ID to the ECS instance. This way, you can determine the attribution of the ECS instance based on the system tag. For more information, see View system tags and the resources to which a system tag is added.|
|tag editor||The tag editor is a tool that is used to manage resource tags in a centralized manner. You can use the tag editor to search for resources that belong to different Alibaba Cloud services and reside in different regions. In addition, you can use the tag editor to add, modify, or remove tags for multiple resources at a time, and export resource lists.|
|createdby tag||createdby tags are a type of system tag that is generated by Alibaba Cloud and automatically added to resources. This type of tag is used to identify the creators of resources. createdby tags can help you analyze costs and bills and manage the costs of cloud resources in an efficient manner.|
Differences between custom tags and preset tags
Different from system tags, custom tags and preset tags are created by users and can be added or removed by users. The following table describes the differences between custom tags and preset tags.
|Custom tag||Custom tags are visible only in the region where they are created. For example, custom tags created in the China (Hangzhou) region are invisible in the China (Beijing) region.||When you create a custom tag, you must add it to a resource. A custom tag that is not added to resources is deleted within 24 hours after it is created.|
|Preset tag||Preset tags are visible in all regions. A preset tag is a tag that you create in advance and is available for the resources in all regions.||You can create a preset tag first and add it to resources in subsequent operations. Preset tags have an independent lifecycle. If you no longer require a preset tag, you can delete it.|
Alibaba Cloud services that support tags
A series of core Alibaba Cloud services support tags, such as ECS, ApsaraDB RDS, Object Storage Service (OSS), Virtual Private Cloud (VPC), Server Load Balancer (SLB), and Container Service for Kubernetes (ACK). Alibaba Cloud intends to add tag support for other services. For more information, see Alibaba Cloud services that support tags.
|Maximum number of tags that can be added to a single resource||20|
|Whether tag information can be shared across regions||
No. For example, in the China (Shanghai) region, you cannot view tags created in the China (Hangzhou) region.
|Tag key||A tag key must be 1 to 128 characters in length and cannot contain
|Tag value||A tag value must be 1 to 128 characters in length and cannot contain
|Adding tags to resources||
Each tag key on a resource can have only one tag value. If you create a tag that has the same key as an existing tag, the value of the existing tag is overwritten.
For example, the
|Maximum number of preset tags that can be created within a single Alibaba Cloud account||1,000|
|Maximum number of tag values that can be specified for a single preset tag key||1,000|