As the number of cloud resources increases, the difficulty in managing the resources also increases. For example, you may be unable to batch collect cost statistics about and perform O&M and monitoring on multiple cloud resources that serve the same purpose or belong to the same application category or organization to ensure that the resources are properly used and efficiently managed. To efficiently manage your resources, you can use tags to classify the resources. Tags are an important grouping tool that helps you in the horizontal management of personnel, finances, and materials and the fine-grained management of resources. Tags are suitable for various cloud resources and can meet your business requirements.
Tags are suitable for scenarios that involve resource management, access control, automated O&M, and cost allocation.
For information about other scenarios for which tags are suitable, see Overview of tags.
Management of application publishing procedures
Resource tracking and tag-based group search and management
Tag-based and group-based automated O&M by using Alibaba Cloud services such as CloudOps Orchestration Service, Resource Orchestration Service (ROS), Auto Scaling, and Cloud Assistant
Tag-based cost management and cost allocation
Resource-based or role-based access control
Best practices for tag design
You can implement the best practices for tag design based on the following principles:
To implement mutual exclusivity, we recommend that you use only one tag key for an attribute. For example, if you use a tag key of
ownerto represent the owner attribute, you cannot use other tag keys, such as own and belonger, to represent the attribute.
Collective exhaustion means that when you plan resources, you must plan tags at the same time and prioritize tag keys. All resources must have tags that consist of the planned tag keys and the corresponding tag values.
Each tag key-value pair must be named in a standard format.
Collective exhaustion is a prerequisite for future tag-based access control, cost tracking, automated O&M, and group-based search.
Limited values mean that excess tag values must be removed and only core tag values are retained.
You can simplify the procedures for resource management, access control, automated O&M, and cost allocation by following this principle. You can also use tags and automation tools based on this principle to manage resources. Elastic Compute Service (ECS) allows you to control tags by calling API operations to facilitate the automated management, search, and filtering of resources.
Considering ramifications of future changes
When you plan tags based on the principle of limited values, you must consider the impacts of adding or removing tag values to improve the flexibility of modifying tags.
If you modify tags, tag-based access control, automated O&M, or related billing reports may change. For corporate or personal business, the best practice is to create business-related tag groups to manage resources in the technical, business, and security dimensions. When you use automated O&M tools to manage resources and services, you can add automation-specific tags to facilitate automated O&M.
Simplified design means that when you plan tags, you must create tag keys that have fixed dimensions to simplify the use the keys. By following this principle, you can reduce operation errors that are caused by redundant tag keys.
You can create business-related tag groups to manage resources in the technical, business, and security dimensions.
When you use automated O&M tools to manage resources and services, you can add automation-specific tags to the resources and services.
Examples of designing tags
The following table provides examples on how to name tags in common dimensions. We recommend that you use lowercase letters to name tags.
Business department (to implement cost allocation and business tracking)
Owner from the finance dimension (to identify the resource owner)
Names or emails
Customer from the finance dimension (to identify the customers whom a specific resource group serves)
Custom or actual values
Project from the finance dimension (to identify the projects that are supported by specific resources)
Order from the finance dimension
Order category IDs
Best practices for using tags
You can manage resources in a fine-grained manner based on tags. You can use tags for the following purposes or to perform the following operations.
Before you manage cloud resources based on tags, you must create tags and add the tags to the resources. For more information, see Create or add a tag or Use OOS to add tags to multiple ECS resources at a time.
You can add tags to your cloud resources based on your business requirements, modify tags, or delete the tags that you no longer need. For more information, see Use OOS to modify a tag value of multiple resources or Delete or remove a tag.
Search for or export resources.
Perform access control.
Resource Access Management (RAM) users can search for authorized resources by global tag. For more information, see Best practices for global tags.
Attach policies to RAM users to allow the RAM users to manage access to ECS instances by using tags. For more information, see Implement fine-grained access control by using tags and Control access to resources by using tags.
You can add the same tag to ECS instances and use the smart tag synchronization feature of CloudMonitor to assign the instances to the same application group for group-based automatic monitoring. The monitoring items include the health, CPU utilization, and memory usage of ECS instances. For more information, see Implement automatic resource monitoring by group based on tags.
Perform automated O&M.
You can use Cloud Assistant to run commands on or send files to ECS instances that have specific tags. For more information, see Control the executions of Cloud Assistant commands based on tags.
You can use OOS to implement automated O&M for resources based on tags. For example, you can batch start ECS instances that have specific tags. For more information, see Overview.