Skip to Content
User GuideLabel Inheritance

Label Inheritance

You can use the label inheritance feature, which allows associated resources to automatically inherit labels from the main resource when the main resource’s labels change or when a relationship is established with the associated resources, improving operational efficiency. For example: When binding labels to a UHost instance, its associated cloud disks, elastic network cards, and elastic public IPs will also automatically bind those labels; subsequent newly added associated resources will also automatically inherit the labels.

1. Usage Limits

  • For a list of resource types supported by this feature, please refer to Resources Supporting Label Inheritance
  • When you enable and set label inheritance rules for associated resources, if the inherited label key has the same name as a label key already existing on the associated resource, the system may overwrite the existing label on the associated resource. For example: If the associated resource is originally bound with the label cost:hangzhou, and the main resource is bound with the label cost:shanghai, and you set a rule that the associated resource can inherit the cost label from the main resource, then the associated resource’s label cost:hangzhou will be overwritten to cost:shanghai.

2. Basic Operations

Enable Label Inheritance Feature

  1. Access the Label Inheritance page.
  2. On the Label Inheritance page, click the Settings button in the Actions column of the target resource type.
  3. In the Settings dialog box, click the enable inheritance button to ON, then click Confirm
  • Apply to existing resources: After enabling, the rule will also apply to existing resources

Disable Label Inheritance Feature

Note: After disabling label inheritance rules, associated resources will no longer automatically inherit labels from the main resource, which may affect your resource management, cost allocation, etc. through labels.

  1. Access the Label Inheritance page.
  2. On the Label Inheritance page, click the Settings button in the Actions column of the target resource type.
  3. In the Settings dialog box, click the disable inheritance button to OFF, then click Confirm

Batch Settings

You can select multiple resources on the Label Inheritance page and set them in batches.

3. Resources Supporting Label Inheritance

Parent Resource TypeChild Resource Type
Elastic ComputeStandard UDisk
Elastic IP
System Disk
SSD UDisk
RSSD UDisk
SSD Essential
Container Service for KubernetesElastic Compute
Bare Metal Elastic Compute