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 categorize 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.
For information about the terms related to tags, see the Terms section in the "Tag overview" topic.
Scenarios
As the number of Elastic Compute Service (ECS) instances that you create increases, you can use tags to manage, group, and categorize the instances to facilitate instance search and batch operations.
For information about more scenarios for which tags are suitable, see Best practices for tags.
Scenario 1: Optimize the management of ECS resources or automate O&M on ECS resources
You can add different tags to different environments (such as production environments and test environments), operating systems (such as Windows Server and Linux), or client platforms (such as iOS and Android). For example, add the Test:Server-Windows
tag to all ECS instances that are involved in a test environment. Then, you can find these ECS instances based on the tags and perform operations on the instances.
Examples of batch operations:
Replace images to deploy applications.
Upgrade patches.
Create security group rules to control network access.
For more information, see Modify the name, description, and tags of a security group.
Use CloudOps Orchestration Service to batch start, stop, or restart ECS instances.
For information about how to batch start ECS instances by using OOS based on tags, see Use OOS to start multiple ECS instances with specific tags at a time.
Use Cloud Assistant to run O&M scripts on multiple ECS instances.
For information about how to run a Cloud Assistant command on ECS instances that have specific tags added, see Control the executions of Cloud Assistant commands based on tags.
Scenario 2: Manage teams or projects
When you manage teams or projects, you can add tags such as CostCenter:aliyun
to categorize groups, projects, or departments. This way, you can implement itemized billing and cross-authorization based on tags in the Expenses and Costs console.
For more information, see the following topics:
Usage notes
Each tag consists of a key and a value.
Each tag key must be unique in a resource.
After you remove a tag from a resource, the system automatically deletes the tag if the tag is not added to other resources.
For information about the suggestions on designing tags, see Best practices for tags.
Limits
For information about limits and quotas of tags, see Tag overview.
ECS resources that support tags
The following ECS resources support tags.
For information about other cloud services and resources that support tags, see Services that work with Tag.
References
You can use tags to manage cloud resources in a fine-grained manner. For example, you can search for, control access to, automate O&M on, or monitor cloud resources based on tags. For more information, see Best practices for tags.
You can also use resource groups to group cloud resources based on usage, permissions, and ownership, so that you can manage the resources in a hierarchical manner for various users and projects. For more information, see Resource Group overview or Resource groups.