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.
Scenarios
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
Principles
You can implement the best practices for tag design based on the following principles:
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.
Dimension | Tag key | Tag value |
Organization |
| Organization-specific names |
Business |
| Business-specific names |
Role |
|
|
Purpose |
| Specific purposes |
Project |
| Project-related values |
Business department (to implement cost allocation and business tracking) |
| Department-related values |
Owner from the finance dimension (to identify the resource owner) | owner | Names or emails |
Customer from the finance dimension (to identify the customers whom a specific resource group serves) | Custom or actual values | Customer names |
Project from the finance dimension (to identify the projects that are supported by specific resources) | project | Project name |
Order from the finance dimension | order | 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.
You can use the tag editor to modify the tags of resources and export resource information. For more information, see Use the tag editor to manage resource tags.
You can search for cloud resources by tag. For more information, see Search for resources by tag.
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.
Monitor resources.
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.