All Products
Search
Document Center

Resource Management:Use the Associated Resource Tagging feature

Last Updated:Nov 14, 2024

Resource Management provides the Associated Resource Tagging feature. When you manage the tags of a primary resource or establish relationships between the primary resource and other resources, this feature enables the associated resources of the primary resource to automatically inherit the tag changes that are made to the primary resource. This improves O&M efficiency and reduces tag management costs. For example, when you add a tag to or remove a tag from an Elastic Compute Service (ECS) instance, the tag is automatically added to or removed from the cloud disks, elastic network interface (ENI), and elastic IP address (EIP) of the ECS instance. When you attach a cloud disk to the ECS instance, bind an ENI to the ECS instance, or associate an EIP with the ECS instance, the cloud disk, ENI, or EIP automatically inherits the tags of the ECS instance.

Limits

  • For information about the resource types that support the Associated Resource Tagging feature, see Resource types that support the Associated Resource Tagging feature.

  • If you select "Specify some tag keys" for a type of resource when you configure an associated resource tagging rule, you can specify a maximum of 50 tag keys.

  • After you enable the Associated Resource Tagging feature and configure an associated resource tagging rule for a type of resource, the existing tag of a resource of this type is overwritten if the key of the tag that you specify is the same as the key of the existing tag. For example, cost:hangzhou is an existing tag of an associated resource, and cost:shanghai is added to the primary resource of the associated resource. If you select "Specify some tag keys" for the associated resource and specify the tag key cost when you configure an associated resource tagging rule, the existing tag cost:hangzhou of the associated resource is overwritten by cost:shanghai.

  • The Associated Resource Tagging feature cannot enable an existing associated resource to inherit the existing tags of the primary resource. If you want to allow an existing associated resource, such as a cloud disk, a snapshot, or an EIP, to inherit the existing tags of the primary resource before you enable the Associated Resource Tagging feature, you can use a public template provided by CloudOps Orchestration Service (OOS). For more information, see Use OOS to inherit tags from ECS instances for the resources of the ECS instances at a time.

Basic operations

Enable the Associated Resource Tagging feature and configure an associated resource tagging rule

  1. Log on to the Resource Management console.

  2. In the left-side navigation pane, choose Tag > Tag Settings for Associated Resources.

  3. On the Associated Resource Tag Settings page, read the feature description and select the check box for creating a service-linked role.

    When you enable the Associated Resource Tagging feature, the system creates the AliyunServiceRoleForTag service-linked role. The role is used to perform tag-related operations on associated resources. For more information, see Service-linked role for Tag.

  4. Click Enable and set rules.

  5. In the upper-right corner of the Associated Resource Tag Settings page, click Edit and configure an associated resource tagging rule.

    You can change the tag inheritance scope for different types of associated resources.

  6. Click OK.

Modify an associated resource tagging rule

  1. Log on to the Resource Management console.

  2. In the left-side navigation pane, choose Tag > Tag Settings for Associated Resources.

  3. In the upper-right corner of the Associated Resource Tag Settings page, click Edit to modify the desired associated resource tagging rule.

    You can change the tag inheritance scope for different types of associated resources.

  4. Click OK.

Disable the Associated Resource Tagging feature

  1. Log on to the Resource Management console.

  2. In the left-side navigation pane, choose Tag > Tag Settings for Associated Resources.

  3. In the upper-right corner of the Associated Resource Tag Settings page, click Turn off this feature.

  4. In the Confirm message, click OK.

Important

After you disable the Associated Resource Tagging feature, the system no longer performs tag-related operations on associated resources. Tags that are inherited by existing associated resources are not affected.

Resource types that support the Associated Resource Tagging feature

Primary resource type

Associated resource type

Description

ECS instance

Cloud disk (including data disks and system disks)

  • If you attach a cloud disk to an ECS instance, the cloud disk automatically inherits the existing tags of the ECS instance and also inherits the tag changes that are made to the ECS instance later.

  • If you detach a cloud disk from an ECS instance, the system removes the tags that are automatically inherited from the ECS instance for the cloud disk.

ENI (including primary ENIs and secondary ENIs)

  • If you bind an ENI to an ECS instance, the ENI automatically inherits the existing tags of the ECS instance and also inherits the tag changes that are made to the ECS instance later.

  • If you unbind an ENI from an ECS instance, the system removes the tags that are automatically inherited from the ECS instance for the ENI.

EIP

  • If you associate an EIP with an ECS instance, the EIP automatically inherits the existing tags of the ECS instance and also inherits the tag changes that are made to the ECS instance later.

  • If you disassociate an EIP from an ECS instance, the system removes the tags that are automatically inherited from the ECS instance for the EIP.

Cloud disk

Snapshot

  • If you create a snapshot for a cloud disk, the snapshot automatically inherits the existing tags of the cloud disk.

  • If you modify the existing tags of the cloud disk, the snapshot automatically inherits the tag changes that are made to the cloud disk.

ApsaraMQ for Kafka instance

Topic

  • If you create a topic based on an ApsaraMQ for Kafka instance, the topic automatically inherits the existing tags of the instance.

  • If you modify the existing tags of the ApsaraMQ for Kafka instance, the topic automatically inherits the tag changes that are made to the instance.

Consumer group

  • If you create a consumer group based on an ApsaraMQ for Kafka instance, the consumer group automatically inherits the existing tags of the ApsaraMQ for Kafka instance.

  • If you modify the existing tags of the ApsaraMQ for Kafka instance, the consumer group automatically inherits the tag changes that are made to the instance.

Container Service for Kubernetes (ACK) cluster

Security group

If you modify the existing tags of an ACK cluster, the related security group automatically inherits the tag changes that are made to the cluster.

ECS instance

  • If you expand an ACK managed cluster, the related ECS instance automatically inherits the existing tags of the cluster.

  • If you modify the existing tags of the ACK cluster, the related ECS instance automatically inherits the tag changes that are made to the cluster.

Server Load Balancer (SLB) instance

If you modify the existing tags of an ACK cluster, the related SLB instance automatically inherits the tag changes that are made to the cluster.

EIP

If you modify the existing tags of an ACK cluster, the EIP of the ACK cluster automatically inherits the tag changes that are made to the cluster.

NAT gateway

If you modify the existing tags of an ACK cluster, the related NAT gateway automatically inherits the tag changes that are made to the cluster.

Scaling group

If you modify the existing tags of an ACK cluster, the related scaling group automatically inherits the tag changes that are made to the cluster.

Regions in which the Associated Resource Tagging feature is available

Indonesia (Jakarta), Malaysia (Kuala Lumpur), China (Hohhot), Singapore, Germany (Frankfurt), US (Virginia), US (Silicon Valley), China (Hong Kong), China (Qingdao), Japan (Tokyo), China (Zhangjiakou), China (Shenzhen), China (Beijing), China (Shanghai), China (Hangzhou), China (Chengdu), UK (London), China (Heyuan), China (Ulanqab), China (Guangzhou), Philippines (Manila), Thailand (Bangkok), China (Nanjing - Local Region), and China (Fuzhou - Local Region).