Use tags for cost allocation

更新时间:
复制 MD 格式

PAI lets you manage resource costs with fine-grained cost allocation using tags. You can view your costs in the Alibaba Cloud Expenses and Costs center. This topic describes how to use tags for cost allocation in PAI.

Background information

Cost allocation is assigning the costs of cloud resources to different project teams or business departments. This helps you analyze your cost structure and manage your cloud spending. Alibaba Cloud offers a tag-based feature for cost allocation to effectively distribute costs across your organization. For more information, see Use tags for cost allocation.

System tag cost allocation

For some PAI resources, the system automatically adds predefined tags. These tags allow you to allocate costs by dimensions, such as workspace or billing method.

About system tags

PAI automatically adds system tags to workspaces, pay-as-you-go DLC jobs, and pay-as-you-go DSW instances. You can use these tags to view cost allocation details by workspace or billing method.

A tag consists of a tag key and a tag value. The main system tags are:

  • The cost allocation tag key for workspaces is acs:pai:aiworkspace:id. The tag value is the ID of the workspace where the resource resides. You can use this tag to separate costs by workspace.

  • The cost allocation tag key for pay-as-you-go DLC jobs is acs:pai:dlc:payType. You can use this tag to distinguish between DLC spot jobs and DLC pay-as-you-go jobs.

    • The tag value for DLC spot jobs is spot.

    • The tag value for DLC pay-as-you-go jobs is postpaid.

  • The cost allocation tag key for pay-as-you-go DSW instances is acs:pai:dsw:payType. You can use this tag to distinguish between DSW spot instances and DSW pay-as-you-go instances.

    • The tag value for DSW spot instances is spot.

    • The tag value for DSW pay-as-you-go instances is postpaid.

View split bills

  1. Enable cost allocation tags. In the Expenses and Costs center, go to the Cost Allocation Tags page. Enable the acs:pai:aiworkspace:id, acs:pai:dlc:payType, and acs:pai:dsw:payType cost allocation tags. For more information, see Enable Cost Allocation Tags.

  2. To view your bills, go to the Split Bill Details or page. Click the filter button in the Instance Tag column. For example, to view cost allocation by workspace ID, set key to acs:pai:aiworkspace:id and value to the workspace ID.

Note
  • Billing details are updated with a one-day delay.

  • If you access the Expenses and Costs center as a RAM user, your Alibaba Cloud account must grant the RAM user the AliyunBSSFullAccess permission. For more information, see Manage RAM User Permissions.

Custom tag cost allocation

PAI supports custom tags for AI computing resources and DSW instances. You can use these tags to allocate costs more flexibly.

Plan your tags

Before using custom tags for cost allocation, plan your tags based on your business and management requirements. For example, a company with a development (Dev) department and a business intelligence (BI) department can define a tag key as department and use Dev and BI as tag values to distinguish the costs of each department.

Attach tags

Attach tags to AI computing resources (nodes)

You can enable order-based cost allocation by adding tags to AI computing resource orders.

  1. Log on to the PAI console. In the left navigation pane, choose AI Computing Resources > Resource Pool.

  2. Click a resource group name to open its product page. Click the edit icon under the Tags column to add, modify, or delete tags for that order.

  3. (Optional) You can manage tags in bulk. You can select multiple nodes. Then, you can click Batch Manage Tags.

Attach tags to DSW instances

You can add tags on the configuration page when you create a DSW instance.

On the Create Instance page, in the Basic Information section, find the Tags field, which displays No Tags Bound by default. Click the field to bind tags.

View split bills

  1. Enable the custom cost allocation tags. In the Expenses and Costs center, go to the Cost Allocation Tags page and enable your custom cost allocation tags. For more information, see Enable Cost Allocation Tags. Note: Tags that you add in cloud service consoles take one day to appear in the Cost Allocation Tags list.

  2. View your bills. Go to the Split Bill Details or page. Click the filter button in the Instance Tag column, and then select your custom cost allocation tag.

Note
  • Billing details are updated with a one-day delay.

  • If you access the Expenses and Costs center as a RAM user, your Alibaba Cloud account must grant the RAM user the AliyunBSSFullAccess permission. For more information, see Manage RAM User Permissions.