You can use tags to identify resources. Enterprises and individuals can use tags to group and categorize their ECS resources to simplify search and management.


Tags can be used to categorize and manage ECS resources. This helps improve search efficiency and allows you to perform batch operations on resources. Examples:

  • You can attach different tags to environments such as production and test environments, operating systems such as Windows and Linux, or mobile platforms such as iOS and Android. For example, create a tag named Test:Server-Windows and attach the tag to all the ECS instances in the test environment. You can easily find these instances based on the tag and perform batch operations. You can perform various batch operations on instances, such as:
    • Change the image for application deployment.
    • Upgrade patches.
    • Add security group rules to control access.
    • Use Operation Orchestration Service (OOS) to start, stop, or restart multiple ECS instances at a time.
    • Run the O&M script on multiple ECS instances by using the Cloud Assistant.
  • You can add tags such as FinanceDept:FinanceJoshua to groups, projects, and departments in team or project management to implement group authorization or mutual authorization. For more information, see Use tags to authorize ECS instances by group.


  • Each tag consists of a key-value pair.
  • For each resource, each tag key must be unique. If a new tag has the same key as an existing tag, the new tag overwrites the existing tag.
  • Tag information is not shared across regions. For example, tags created in the China (Hangzhou) region are not visible to the China (Shanghai) region.
  • Tags are deleted when they are not attached to any resources.


For more information about limits and quotas of tags, see the Tags section in Limits.

Services that support tags

Service Resource API operation
Elastic Compute Service (ECS)
  • ECS instance
  • Block Storage
  • Snapshot
  • Image
  • Security group
  • Elastic Network Interface (ENI)
  • Dedicated host
  • SSH key pair
  • Launch template
Virtual Private Cloud (VPC)
  • VPC instance
  • VSwitch
  • Routing table
  • Elastic IP address
ApsaraDB for Redis ApsaraDB for Redis instance
Content Delivery Network (CDN) Domain name
Key Management Service (KMS) Key
ApsaraDB for POLARDB Cluster
Object Storage Service (OSS) Storage Add, delete, modify, or query tags for a bucket:bucket-tagging
ApsaraDB for RDS ApsaraDB for RDS instance
AnalyticDB for PostgreSQL AnalyticDB for PostgreSQL instance Query resources based on a tag:DescribeDBInstances
Cloud Enterprise Network (CEN) CEN instance
Smart Access Gateway (SAG) Cloud Connect Network (CCN) Query resources based on a tag:DescribeCloudConnectNetworks
Cloud Security Scanner Assets
Apsara File Storage NAS File system
Operation Orchestration Service (OOS)
  • OOS template
  • OOS execution