All Products
Search
Document Center

User Center:Allocate resources by using an automatic allocation rule

Last Updated:Dec 25, 2023

Description

You can configure an automatic allocation rule to automatically allocate instances that meet specified conditions to a specified cost center. This eliminates the strenuous and time-consuming process of manual allocation. This topic describes how to configure an automatic allocation rule.

Procedure

Automatic allocation rule

Create a rule

Log on to the Billing Management console. Choose Cost Allocation - Cost Center. On the left of the Cost Center page, click the name of a cost center. On the right of the Cost Center page, click Automatic Allocation Rule. On the Automatic Allocation Rule tab, click Create Rule.image.png

  • Add conditions. Click Add Condition and configure the condition as prompted.

image

  • Add condition groups. Click Add Condition Group and configure the condition group as prompted. You can configure multiple conditions for the condition group. You can specify logical operators, such as AND and OR, to connect the conditions.image.pngimage

  • Dimensions. You can configure a condition for an automatic allocation rule based on one of the following dimensions:

    • Account: Select Account from the Condition drop-down list. Specify a linked account whose resources you want to allocate to the cost center.

    • Product: Select Product from the Condition drop-down list. Specify a service whose resources you want to allocate to the cost center.

    • Product Details: Select Product Details from the Condition drop-down list. The resources that match the specified details of a service are allocated to the cost center.

    • Resource Group: Select Resource Group from the Condition drop-down list. Specify a resource group whose resources you want to allocate to the cost center.

    • Tag: Select Tag from the Condition drop-down list. The resources that match the specified key-value information are allocated to the cost center.

    • Name: Select Name from the Condition drop-down list. The instances that match the specified name are allocated to the cost center. If the length of a specified name exceeds 18 characters, the excess characters are truncated.

Important
  • You can configure conditions on multiple dimensions or multiple conditions on the same dimension.

  • If you log on to the Billing Management console with a main financial account, you can view the information about the main financial account and the linked accounts. If a linked account is disassociated from the main financial account, the corresponding conditions are disabled. The resources of the linked account are no longer visible and the costs of the linked account are no longer calculated.

  • The system allocates instances whose tag, resource group, and name match the specified conditions.

After you configure conditions and condition groups, click Submit.

Effective scope

Choose Cost Allocation -Cost Center. On the Cost Center page, turn on Automatic allocation rules apply to all resources. This improves efficiency when the system uses an automatic allocation rule to allocate instances to cost centers.

image.png

  • After you turn on the preceding switch, the automatic allocation rules of all cost centers take effect for all resources, including new resources, unallocated resources, and resources allocated by using an automatic allocation rule.

Note

This setting does not take effect for resources that you manually allocated to cost centers. You can still remove the resources from cost centers. After the status of the resource changes to Unallocated, the resources can be allocated by using an automatic allocation rule.

  • If you do not turn on the switch, an automatic allocation rule takes effect only for new resources and unallocated resources.

Important

  • You can create only one automatic allocation rule for a cost center.

  • You can configure a maximum of 10 conditions for an automatic allocation rule.

  • After you configure an automatic allocation rule for a cost center, the matched instances are allocated to the cost center the day after allocation. You can view the result on the Billing Details tab.

  • If an instance matches multiple automatic allocation rules, the automatic allocation rule of the first cost center in the Cost Center tree takes precedence. After the automatic allocation rule is executed for the instance, the subsequent rules no longer take effect.

  • After an instance is automatically allocated to a cost center, you can remove the instance from the cost center and re-allocate the instance to another cost center. You can also transfer the instance to another cost center. For more information, see Allocate resources.

  • Automatic allocation rules do not take effect for instances that are manually allocated to cost centers. On the Cost Center page, you can check whether an instance is automatically or manually allocated in the Source column.

  • For more information, see Cost centers.

Allocate attached resources

Log on to the Billing Management console. Choose Cost Allocation > Cost Center. On the Cost Center page, click Edit Rule under Associated ECS resources are allocated or transferred.

image

In the dialog box that appears, specify one or more types of attached resources that you want to automatically allocate together with ECS instances.

image

Important
  • If you configure an attached-resource allocation rule for a specific type of resources, the resources attached to an instance are allocated together with the instance to a cost center.

  • Attached-resource allocation rules take precedence over automatic allocation rules and manual allocation.

  • If you configure an attached-resource allocation rule for a specific type of resources, you cannot manually allocate the resources.