All Products
Search
Document Center

Elastic Compute Service:overview of tags

Last Updated:Mar 14, 2024

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.

Note

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:

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.

Note

For information about other cloud services and resources that support tags, see Services that work with Tag.

ECS resources to which tags can be added

  • ECS instances

  • Disks

  • Reserved instances

  • Block storage devices

  • Snapshots

  • Snapshot-consistent groups

  • Automatic snapshot policies

  • Images

  • Image components

  • Image templates

  • Security groups

  • Elastic network interfaces (ENIs)

  • Dedicated hosts

  • SSH key pairs

  • Launch templates

  • Dedicated host groups

  • Elasticity assurances

  • Capacity reservations

  • Storage capacity units

  • Cloud Assistant commands

  • Execution results of Cloud Assistant commands or file sending tasks

  • Instances managed by Cloud Assistant

  • Activation codes for instances managed by Cloud Assistant

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.