Use tags for cost allocation

Updated at:

MaxCompute allows you to bind tags to projects and level-1 quotas. After you bind tags, you can view your cost data by using the Split-item Bill or Cost Analysis features in Billing Management. This topic describes how to use tags for cost allocation in MaxCompute.

Background

Cost allocation is the process of assigning the costs of cloud resources to different cost centers, such as project teams or business units. This helps you understand your cloud cost structure, manage costs across complex organizational hierarchies, and simplify financial management. Alibaba Cloud provides a tag-based cost allocation feature to help you manage and distribute your cloud costs. For more information, see Use tags for cost allocation.

To use tags for cost allocation in MaxCompute, perform the following steps:

  1. Step 1: Plan your tags

  2. Step 2: Bind tags

  3. Step 3: View cost allocation reports

For more information about Split-item Bill, see Split-item Bill.

Step 1: Plan your tags

You can bind different tags to MaxCompute projects and level-1 quotas based on the departments they belong to.

For example, assume that an Alibaba Cloud account is shared by four projects and three business units: R&D Center, BI Analysis, and Sales. projectA uses one subscription computing resource (a default subscription quota). The other projects are pay-as-you-go.

  • Projects projectA and projectB belong to the R&D Center.

  • Project projectC belongs to the BI Analysis department.

  • Project projectD belongs to the Sales department.

The following table shows the tags planned for the MaxCompute projects.

Project name

Default computing quota

Region

Business unit

Tag (key:value)

projectA

Default subscription quota

China (Beijing)

R&D Center

department:Dev

projectB

Default pay-as-you-go quota

China (Beijing)

R&D Center

department:Dev

projectC

Default pay-as-you-go quota

China (Beijing)

BI Analysis

department:BI

projectD

Default pay-as-you-go quota

China (Hangzhou)

Sales

department:Sales

Note

Tags bound to a project apply to pay-as-you-go charges. The instance ID in the bill is displayed in the format of Project Name;Region.

The following table shows the tags planned for the level-1 quotas.

Quota name

Instance ID

Region

Tag (key:value)

Default subscription quota

9aa762ca-xxxx-xxxx-xxxx-xxxx5169c6ca

China (Beijing)

department:Dev

Note

Tags bound to a level-1 quota apply to both subscription and pay-as-you-go charges:

  • For subscription bills, the instance ID is the quota instance ID.

  • For pay-as-you-go bills (for the elastic reserved CU billable item), the instance ID is displayed in the format of Quota Name;Region.

Step 2: Bind tags

Bind tags to a project

  1. Log in to the MaxCompute console and select a region in the upper-left corner.

  2. In the left-side navigation pane, choose Manage Configurations > Projects.

  3. Create tags

    1. Hover over the Edit icon in the Tag column of the target item, and click Edit.

    2. In the Configure Tags dialog box, enter a Tag Key and a Tag Value.

    3. Click OK. In the Configure Tags successfully dialog box, click Close.

Bind tags to a quota

  1. Log in to the MaxCompute console and select a region in the upper-left corner.

  2. In the left-side navigation pane, choose Manage Configurations > Quotas .

  3. Bind a tag.

    1. Hover over the Edit icon in the Tag column of the target level-1 quota, and click Edit.

    2. In the Configure Tags dialog box, enter a Tag Key and a Tag Value.

    3. Click OK. In the Configure Tags successfully dialog box, click Close.

Note

For more information about tag management, see Project Management and Quota Tag Management.

Step 3: View cost allocation reports

Split-item Bill

Note
  • You must activate the Split-item Bill feature before you can use it. Data is available one day after you bind the tags. For more information, see Activation and management and Split-item Bill Details.

  • If you have activated the cost tag feature and enabled specific tags as cost tags, only the enabled cost tags are displayed on pages such as Cost Analysis and bill details in Billing Management. If you have activated this feature but have not enabled any tags, no tags are displayed in Billing Management. For more information, see Cost tags.

  1. Log in to the Billing Management console. In the left-side navigation pane, choose Cost Allocation > Split-item Bill Details.

  2. Set the Filters to view cost information.

    The following example shows how to view the cost details for the R&D department (department:Dev).

    1. In the Instance Tag column, click the image icon.

    2. In the dialog box, select the department:Dev tag.

    3. Click OK.

  3. (Optional) In the upper-right corner of the cost report area, click the imageicon. In the Export Bill CSV dialog box, filter by tag and export the cost details as a CSV file.

Cost Analysis

In the Cost Analysis section of Billing Management, you can set tag filters to view resource costs. You can also export the cost details as a CSV file.

Note

You must activate the Cost Analysis feature before you can use it. Data is available one day after you bind the tags. For more information, see Activation and management and Cost Analysis.

  1. Log in to the Billing Management console. In the left-side navigation pane, click Cost Analysis.

  2. Set the Filters to view cost information.

    The following example shows how to view the cost details for the R&D department (department:Dev).

    1. In the Filters area on the right, click Expand, and then click Tag.

    2. In the dialog box, select the department:Dev tag.

    3. Click Confirm.

  3. (Optional) In the upper-right corner of the cost report area, click Export to export the filtered cost details as a CSV file.