All Products
Search
Document Center

:Tag overview

Last Updated:Nov 04, 2024

Tags are used to identify resources. Tags allow you to categorize, search for, and aggregate resources that have the same characteristics from different dimensions. This facilitates resource management.

Scenarios

You can use tags to perform the following operations:

  • Search for resources.

    You can add tags to resources and search for resources based on the tags in the Resource Management console or by calling a tag-related API operation. For more information, see Use tags to query resources.

  • Implement automated O&M.

    You can add different tags to resources in different environments such as production and test environments, resources that run different operating systems such as Windows and Linux, or resources on different mobile platforms such as iOS and Android. Then, you can create a template in CloudOps 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.

Benefits

The Tag service provides the following benefits:

  • 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.

Terms

Term

Description

key-value pair

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.

predefined tag

A predefined tag is a tag that you create in advance and is available for resources in all regions. You can create predefined tags in the stage of tag planning and add them to resources in the stage of tag implementation. The system provides some common built-in types for predefined tags. This allows you to quickly plan tag systems. For more information, see Create a predefined 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 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 system tags that are generated by Alibaba Cloud and automatically added to resources. Createdby tags can help you identify the creators of resources, analyze costs and bills, and manage the costs of resources in an efficient manner. For more information, see Overview.

tag policy

Tag policies are used to standardize the tags that are added to resources. You can use a tag policy to define the tags that must be added to your resources. Compliant tags can help you improve the efficiency in aspects such as tag-based cost allocation, tag-based access control, and automated O&M. Tag policies support the single-account mode and resource directory mode. The two modes can meet your business requirements for standardized tag management in different stages. For more information, see Overview.

Differences between custom tags and predefined tags

Different from system tags, custom tags and predefined tags are created by users and can be added to or removed from resources by users. The following table describes the differences between custom tags and predefined tags.

Tag type

Visibility

Lifecycle

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.

Predefined tag

Predefined tags are visible in all regions. A predefined tag is a tag that you create in advance and is available for resources in all regions.

You can create a predefined tag first and add it to resources in subsequent operations. Predefined tags have an independent lifecycle. If you no longer require a predefined tag, you can delete it.

Services that work with Tag

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 Services that work with Tag.

Limits

Item

Limit

Adjustable

Remarks

Maximum number of tags that can be added to a single resource

20

Apply for a quota.

  • The quota varies based on the resource type. This indicates that the maximum number of tags that can be added to a single resource depends on the type of the resource. You need to go to the Quota Center console to check whether you can adjust the quota for a type of resource.

  • After you apply for a quota increase for a type of resource and the application is approved, the new quota takes effect within one hour.

  • If you want to increase the quota for ECS instances, we recommend that you apply for a quota increase for ECS disks and ECS elastic network interfaces (ENIs) when you apply for a quota increase for ECS instances. The disks and ENIs are created together with ECS instances.

Maximum number of predefined tags that can be created within a single Alibaba Cloud account

1,000

N/A

N/A

Maximum number of tag values that can be specified for a single predefined tag key

1,000

N/A

N/A

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.

N/A

N/A

Tag key

A tag key can be up to 128 characters in length and cannot contain http:// or https://. It cannot start with acs: or aliyun.

N/A

N/A

Tag value

A tag value can be up to 128 characters in length and cannot contain http:// or https://. It cannot start with acs: or aliyun.

N/A

N/A

Adding tags to resources

Each tag key on a resource can have only one tag value. If you attempt to add a tag that has the same key as an existing tag, the value of the existing tag is overwritten.

For example, the city:shanghai tag is added to a resource. If you add the city:newyork tag to the resource, the city:shanghai tag is automatically removed from the resource.

N/A

N/A