All Products
Search
Document Center

Resource Management:Categorize resources with tags

Last Updated:Jun 04, 2026

A tag is a key-value pair that you attach to a resource. Tags let you categorize, search, and aggregate resources by shared characteristics. This topic walks you through creating predefined tags, adding them to resources, and applying tags to common scenarios.

Prerequisites

The resource type you want to tag must be supported. Cloud services that support tags.

Step 1: Create a predefined tag

A predefined tag applies across all regions, making it ideal for the planning phase. Plan your tags based on business requirements using Best practices for tag design, then create them and add them to resources. Create a tag.

  1. Log on to the Tag console.

  2. In the navigation pane on the left, choose Tags > Tag. Then, click Create Tag.

  3. In the Create Tag dialog box, set the tag key and tag value, then click Create.

    For example, set Tag Key to BusinessUnit and Tag Value to Beijing, Shanghai, and Hangzhou.

Step 2: Add tags to resources

New resources

Add tags when you create a resource:

  • In the console of a cloud service, specify the tag when you create a resource. Refer to the documentation for the specific cloud service.

  • When you call an API operation to create a resource, specify the tag in the request parameters. Refer to the documentation for the specific cloud service.

The following example adds a tag when creating a VPC in the VPC console.

  1. Log on to the VPC console.

  2. Create a VPC and add a tag to it.

    In the Resource Group and Tags section, set Tag Key to BusinessUnit and Tag Value to Beijing.

    Create and manage a VPC.

Existing resources

Add tags to existing resources:

The following example uses the Tag console to add the predefined tag created in Step 1 to a resource.

  1. Log on to the Tag console.

  2. In the navigation pane on the left, choose Tags > Tag.

  3. In the list of predefined tags, find the tag you want to add and click Add to Resources in the Actions column.

    Note

    If a tag key has more than three values, click View More to view all values.

  4. In the Add to Resources dialog box, select the target resources.

    For Method to Specify Resources, select one of the following:

    • Select from Resource List: Select resources from a list.

    • Enter Resource IDs: Select the service and region, and then enter the resource IDs. Separate multiple IDs with a comma.

  5. Click Bind.

Note
  • Use Tag inheritance to automatically propagate tag changes to associated resources when you manage the tags of a primary resource or associate it with other resources. For example, adding or removing a tag on an ECS instance automatically applies the change to its cloud disks, ENIs, and EIPs. Newly attached resources also inherit the instance tags.

  • Use tag policies to enforce compliance by specifying required tags on resources. Compliant tags improve cost allocation, access control, and automated O&M.

Use cases

After tagging resources, you can use tags with other cloud services to find resources, control access, and automate O&M.

Cloud service

Use case

Category

References

Tag

Use the Tag console or API to find resources by specific tags.

Find resources by tag

Find resources using tags

CloudOps Orchestration Service (OOS)

Tag resources by environment (production, test), OS (Windows Server, Linux), or client platform (iOS, Android), then create and run OOS templates to perform batch O&M tasks.

Tag-based automated O&M

Use tags for automated O&M

Resource Access Management (RAM)

Use tags with RAM to grant tag-based permissions to RAM users for cloud resources.

Access control by tag

Use tags to control access to ECS instances