Use tags for cost allocation of instance-based services
Instance-based services such as ECS, SLB, and EIP are billed at the instance level. Tags let you allocate costs for these services to specific departments or projects.
Step 1: Create and add a tag
In this example, create and add the Project:Game tag to ECS instances in the Tag console to identify resources that belong to the game project.
-
Log on to the Tag console.
-
In the left-side navigation pane, choose , and then click Create Tag.
-
In the Create Tag dialog box, enter a tag key (for example,
Project) and a tag value (for example,Game), and then click Create. -
In the tag list, find the tag and click Add to Resources in the Actions column. Select the desired ECS instances and click Add.
-
In the ECS console, verify that the tag is added to the ECS instances.
In the instance list, the Project:Game tag appears in the Tag column, confirming that the tag was added.
Step 2: Enable a cost allocation tag
Enable a tag as a cost allocation tag so that it appears on billing pages and in cost centers. This example uses the tag key Project.
-
Go to the Cost Allocation Tags page in Expenses and Costs. If you have not activated this feature, follow the on-screen instructions to activate it.
-
On the Cost Allocation Tag page, select the tag and enable it.
ImportantA new tag appears on the cost allocation tag list one day after it is created.
Step 3: Create an automatic allocation rule
On the Cost Center page in Expenses and Costs, create an automatic rule to allocate resources to cost centers based on tags.
-
Go to the Cost Center page in Expenses and Costs. If you have not activated the cost center feature, follow the on-screen instructions to activate it.
-
On the Cost Center page, click + in the cost center tree on the left to create a cost center.
-
If no rules exist in the cost center, click Create Rule. Otherwise, click Edit to modify an existing rule.
-
Configure an automatic rule to allocate resources to the cost center based on tags.
-
Condition: Select Tag.
-
Tag key: In this example, select
Project. -
Tag value: In this example, select
Game.
For more information, see Set global rules.
-
-
View the automatically allocated resources.
ImportantAutomatically allocated resources appear in the cost center one day after the rule is created.