Cost Center

更新时间:
复制 MD 格式

Cost Centers allow you to consolidate costs from scattered cloud resources into specific cost units. This helps you attribute costs to internal entities like departments and projects.

Overview

By combining dimensions such as tags, resource groups, resource names, product types, regions, and accounts, the system automatically allocates and aggregates spending data into cost views that align with your organizational structure or business model.

Key capabilities of Cost Centers include:

  • Multi-condition rules: Flexibly combine dimensions like tags, products, regions, accounts, and instances using AND/OR logic.

  • Hierarchical tree management: Create a multi-level tree structure that mirrors your actual organization. This enables cost analysis with roll-ups at each level.

  • Shared cost allocation: Distribute shared costs from resources used by multiple business units, such as network traffic or storage, based on a specified ratio.

  • Integration with budget management: Set individual budgets for each Cost Center and receive alerts when spending exceeds the threshold.

  • Visual cost analysis: Integrate with cost analysis tools to view spending and cost trends for each Cost Center.

Cost Centers can address complex cost allocation needs:

  • Allocate costs by department or Cost Center: To track the monthly cloud spending of each department, you can create a Cost Center for each one. Rules can be based on accounts or specific department tags, such as department:rd, to automatically aggregate all costs from resources belonging to that department.

  • Allocate costs by project or product line: To calculate the return on investment (ROI) for a product line that includes multiple microservices, create a Cost Center for that specific project. For example, set a rule for all resources with the tag project:e-commerce.

  • Allocate costs by environment (production vs. test): To prevent uncontrolled spending and resource waste in test environments, create "Production" and "Test" Cost Centers. Set rules based on tags like env:prod and env:test. You can also set a lower budget with alerts for the "Test" environment to effectively control non-production expenses.

  • Fine-grained allocation for shared resources: For resources that serve multiple business projects, such as Kubernetes or database clusters, you can group them into a "Shared Resource Pool" Cost Center. Then, use the cost splitting feature to automatically allocate the total cost based on metrics like each project's CPU/memory usage or number of API calls.

Procedures

Note

The new Cost Center feature is being rolled out in stages. It includes new capabilities such as allocation preview, automatic Cost Center creation, and historical rule viewing. This guide highlights the differences between versions.

You can identify which version you are using by the appearance of the Cost Center homepage. If you are on the old version, please wait for the system to be upgraded.

New Cost Center

image

Old Cost Center

image

If you have never used Cost Centers, the new version displays the rule editing page by default. If you have used them before, it opens to the overview page.

Create a Cost Center

You can create a Cost Center either manually or automatically (a new feature in the latest version).

  • Manual creation: Customize the structure based on your organization, business categories, or other criteria.

  • Automatic creation: Quickly build a structure based on your existing account tree or resource groups.

Manual creation

  1. Log on to theExpenses and Costs console.

  2. In the left-side navigation pane, choose Cost > cost allocation > Cost Center.

  3. Go to the Cost Centers page.

    New console

    • Click Edit Rule on the right to open the Cost Center Rule Management page.

      image

    • Click the image icon next to Cost Center to add a new Cost Center.

      image

    Old console

    Click the image icon next to Cost Center to add a new Cost Center.

    image

  4. For an existing Cost Center, click the icons on the right to rename, copy, or delete it.

    image

Automatic creation (new version)

  1. Log on to theExpenses and Costs console.

  2. In the left-side navigation pane, choose cost allocation > Cost Center to go to the Cost Centers page.

  3. Click Edit Rule on the right to go to the Cost Center Rule Management page.

  4. Click Automatic Creation and Select Information to Sync in the pop-up window.

    image

    • Enterprise/Organization/Account: If you have enabled Enterprise Account Center, you can sync the account list and names to serve as your Cost Center tree structure.

    • Resource group: This is useful if you allocate costs based on resource groups.

  5. After making your selection, click Create. The system automatically creates the Cost Centers. You can view creation details in the Automatically Create List. Once the creation is complete, click the image icon to refresh the tree structure.

OpenAPI

You can use the following APIs to create, modify, and manage Cost Centers.

API

Description

CreateCostUnit

Creates one or more Cost Centers.

ModifyCostUnit

Modifies one or more Cost Centers.

QueryCostUnit

Queries the details of a Cost Center node.

DeleteCostUnit

Deletes a Cost Center.

Note
  • Cost Centers support a maximum of four hierarchical levels.

  • By default, you can create up to 200 Cost Centers per account.

  • You can drag and drop Cost Centers to reorder them in the tree. Rule priority decreases from top to bottom.

Resource allocation

After creating a Cost Center, you need to associate resources with it. You can do this by creating allocation rules or through manual allocation.

Allocation rules

Create allocation rules to automatically assign instances that meet specific criteria to a designated Cost Center.

New console

  1. Go to the Cost Center Rule Management page and select a Cost Center.

  2. In the Allocation Rule section on the right, click Edit.

    image

  3. Create a rule using dimensions such as Resource Owner Account, Product Name, Commodity Name, Region, Instance ID, and Resource Tag. You can combine multiple conditions.

    image

    Rule configuration

    Supported options

    resource owner account, product name, commodity name, resource group, region

    Supports "is" and "is not". Multiple selections are supported.

    resource name, tag, Instance ID (billing granularity)

    Supports "is" and "is not" (use commas to separate multiple entries). Supports "contains", "does not contain", "starts with", and "ends with".

  4. After setting the conditions, click Preview to see the allocation results based on the previous billing cycle's data. This preview is for reference only and may not match the data in cost allocation details or bills.

  5. Once you confirm the rule is correct, click Save to save the automatic allocation rule.

Old console

  1. Select a Cost Center, go to the Automatic Allocation Rule tab, and click Edit.

    image

  2. Add a condition or condition group. Create a custom rule based on criteria such as resource owner account, product name, product detail, tag, resource group, or resource instance name from the drop-down lists.

    image

  3. Click Submit.

Manual allocation

Manual allocation allows you to assign a resource to a Cost Center directly. Manual allocation takes precedence over automatic allocation.

  1. On the All Resources (or All Resources in the old version) or Unallocated Resources list, you can view the current allocation status of your resources.

    image

  2. Find the resource you want to manage and perform actions such as allocate, transfer, or remove. You can select multiple resources to perform these actions in bulk.

    1. Allocate: For Unallocated Resources that do not belong to a Cost Center, click Allocate to assign them manually.

    2. Transfer: For resources that need to be moved to a different Cost Center, click Transfer and select the destination Cost Center in the pop-up window.

    3. Remove: For resources that should not be allocated, click Remove to unassign them from their current Cost Center.

Shared cost splitting rules

This rule allows you to split the costs from a specified Cost Center and distribute them to other Cost Centers, which is useful for allocating shared costs.

New console

  1. Log on to the Expenses and Costs console. In the left-side navigation pane, choose Cost > cost allocation > Cost Center.

  2. Go to the Cost Center page, click Edit Rule on the right to go to the Cost Center Rule Management page.

  3. Switch to the Shared Cost Splitting Rule Management tab and click Add Splitting Rule to create your first shared cost splitting rule.

    image

  4. Specify the source of the shared costs, the destination Cost Centers, and the splitting method.

  5. Click Preview to see how the rule will work.

  6. Click More next to Preview to view the allocation results for all resources under the management account and its sub-accounts by default. You can switch accounts and billing cycles (current or previous month) for the preview.

    image

  7. Once you confirm the rule is correct, click Save.

Old console

  1. Log on to the Expenses and Costs console. In the left-side navigation pane, choose Cost > cost allocation > Cost Center.

  2. On the Cost Center page, click Overview. Find Splitting Rules and click Edit Rule.

    image

  3. On the Splitting Rules page, click Add Splitting Rule to create your first rule.

  4. Specify the source of the shared costs, the destination Cost Centers, and the splitting method, then click Save.

    image

  5. You can add multiple splitting rules. Return to the overview page to View Available Rules.

Global rules

Global rules allow you to set automatic allocation for all products and enable attached-resource allocation for ECS-associated resources. This helps reduce allocation errors.

New console

  1. Go to the Cost Center page, click Edit Rule on the right to go to the Cost Center Rule Management page.

  2. Click the Configure button in the upper-right corner to configure global rules in the pop-up window.

    image

Old console

On the Cost Center page, click Overview to configure rules:

image

The following are the global rules you can set:

  • Automatic allocation rules apply to all resources.

    • When enabled, any changes to automatic allocation rules will apply to all cloud instances that are not manually allocated.

    • When disabled, changes to automatic allocation rules will only apply to unallocated cloud instances.

  • The amount is summarized based on the cost center level.

    • When enabled, the cost report on the Cost Center>Overview>Overview page summarizes cost allocation data (such as payable amount, post-discount amount, cost amount, or cost amount without coupons) according to the Cost Center tree.

    • When disabled, the cost overview report displays a flat list and does not roll up amounts hierarchically.

  • Do Not Show Resources Causing No Fees in {select} and Having No Cost Center

    • You can configure this for the last 1, 2, or 3 months. The default is Last 3 Months.

    • For example, if you select Last 2 Months, any resource that has not incurred costs for the last two months (current and previous) and is not associated with a Cost Center is automatically hidden on the All Resources and Unallocated Resources pages.

  • Billing Cycles for Billing Data Update After Cost Center Rule Changes

    • When a Cost Center rule changes, billing data for the last N months is refreshed based on the new rule.

    • Data for older billing cycles is not refreshed.

  • Associated ECS resources are allocated or transferred.

    This rule determines whether resources like EIP, Disk, and Snapshot are allocated along with their parent ECS instance. If selected, these resources are automatically assigned to the same Cost Center as the associated ECS instance. Otherwise, they are not.

  • If the ECS resource does not exist, the original attached ECS resource is automatically allocated based on the automatic allocation rule.

    • When enabled, associated resources configured for attached-resource allocation can be assigned by other custom allocation rules if their parent ECS instance no longer exists.

    • When disabled, these same resources cannot be assigned by other custom allocation rules if their parent ECS instance no longer exists.

Note
  • Allocation priority: manual allocation > attached-resource allocation > automatic allocation.

  • If an instance matches multiple automatic allocation rules, the rule for the Cost Center that appears first in the tree applies. Subsequent matching rules are ignored.

  • If a resource matches rules from both a management account and a sub-account, it is assigned to the Cost Center of the management account.

  • A resource that has not incurred costs for the last three months and is not assigned to any Cost Center is automatically removed from the unallocated resources list and cannot be reallocated.

Cost Center information

New console

Overview

  1. Log on to the Expenses and Costs console. In the left-side navigation pane, choose Cost > cost allocation > Cost Center.

  2. On the Cost Center overview page, you can view the following:

    1. Basic Information: The number of Cost Center rules, the effective billing cycle of rules, the number of allocated resources, the total number of resources, and the last modification time.

    2. Cost Overview:

      1. Analyze costs by payable amount, post-discount amount, cost amount, or cost amount with coupons.

      2. A donut chart shows the top 8 Cost Centers with their corresponding amounts and percentages.

      3. A table displays the amount, apportioned amount, total (sum of amount and apportioned amount), and percentage for each Cost Center. You can click to navigate to the Cost Analysis page and Rule Details page.

      4. Aggregate by Hierarchy: This is disabled by default. If you enable it, costs will be summarized according to the Cost Center tree, where a parent's total is the sum of its own costs and the costs of all its children.

      Note

      For enterprise users with multiple accounts, selecting "All Accounts" will include all costs from all sub-accounts for the specified billing cycle, and the Cost Center information will reflect resources across all accounts.

Historical rule details

Switch to the Rule Details tab to view information about automatic and shared cost rules:

  • On the automatic rules page, you can view Rule Details and Rule Type, ordered by the Cost Center tree. Automatic rules are sorted by effective priority, where 1 is the highest priority.

    image

    Click View Version History to go to the historical rule query page and see the change history for that Cost Center.

  • On the shared cost rules page, you can view the details of your shared cost splitting rules.

Note

For Cost Centers created before upgrading to the new version, you cannot view rule history or perform certain related actions.

Resource list

  1. Go to the Cost Center homepage, click Edit Rule in the upper-right corner to go to the Cost Center Rule Management page.

    image.png

  2. In the resource list menu, you can query and manage all resources and unallocated resources.

  3. You can search for resources by Instance ID, Resource Name, or Attached-resource allocation instance ID.

  4. You can query all resources under the management account and its sub-accounts. The displayed fields are: Account, Cost Center, Product, Commodity, Splitting Item Id, Instance ID, Resource Name, Resource Group, Resource Tag, Region, Resource last billed cycle, Rule source, Rule version, Number of refreshed billing cycles, Attached-resource allocation instance ID, and Operations.

Cost allocation bills

You can view detailed cost allocation information in Split Bill. For more information, see cost allocation details.

Old console

After configuring the rules, you can view specific Cost Center details, resource allocation information, and the costs for each Cost Center.

  • Log on to the Expenses and Costs console. In the left-side navigation pane, choose Cost > cost allocation > Cost Center.

  • On the Cost Center page, you can view the monthly cost overview.

    image

    Note

    Overview data is updated with a 48-hour delay. For split-billing products such as OSS, snapshot, and cloud communications, the update for specific itemized costs can take up to 72 hours.

    The cost overview supports data for the last 12 months.

  • Click a specific Cost Center to view and modify its Automatic Allocation Rule and see the currently allocated resources. On the resource tab, the Source field indicates whether a resource was allocated automatically or manually. You can transfer or remove resources from this tab.

    image

    Note

    When you reallocate a resource or modify an automatic allocation rule, the changes are updated with a 48-hour delay. For split-billing products such as OSS, snapshot, and cloud communications, the update for specific itemized costs can take up to 72 hours.

  • You can also find detailed cost allocation information in cost allocation details. For more information, see cost allocation details.

FAQ

Automatic allocation rules not working

If resource allocation does not take effect after you configure an automatic rule, check the following possible causes:

  • Tag issues: Check if your tags are configured correctly. Spaces in tag keys or values can cause allocation problems. Go to the Cost Allocation Tags page to delete tags with spaces and add them again correctly.

  • Allocation rule issues: Make sure your automatic allocation rules are configured correctly. Check and adjust the rules on the Automatic Allocation Rule tab for the relevant Cost Center.

  • Effective time issues: Data updates can be delayed. If the changes have not appeared after the periods specified below, please submit a ticket with the specific Cost Center name and unallocated instance ID for assistance.

    • Automatic allocation rules for unallocated resources typically take effect within 24 hours.

    • When you reallocate resources or modify an automatic allocation rule, the changes are updated with a 48-hour delay. For split-billing products such as OSS, snapshot, and cloud communications, the update for specific itemized costs can take up to 72 hours.

  • Rules don't take effect after a modification, and a new Cost Center isn't allocating costs:

    • Reason: The "Apply automatic allocation rules to all resources" option is not enabled. After you modify the Cost Center rules, the system does not automatically reallocate resources that are already allocated.

    • Solution: Manually reallocate the resources, or enable Apply automatic allocation rules to all resources. Check the cost allocation details again after 48 hours.

Matching priority for resource groups and tags

If a single Cost Center allocation rule includes conditions for both a resource group and a tag, a resource will match the rule if it meets either condition. There is no priority between conditions within the same rule.

Tagged resources missing from cost details

  1. Check if the cost allocation tag is enabled: Cost allocation details typically only show costs for enabled cost allocation tag keys.

  2. Check if the resource type supports cost allocation: Not all taggable resources can be displayed in bills or cost allocation details.

  3. Check if the tag existed when the bill was generated: Cost allocation is based on tags that were active during the billing period. Tags applied after this period will not appear in the details.

Cost overview data not updated

There is a delay when you reallocate resources or modify automatic allocation rules. Data updates are typically delayed by 48 hours. For split-billing products such as OSS, snapshot, and cloud communications, the update for specific itemized costs can take up to 72 hours.

Allocating unallocated costs

If you have shared costs or costs that cannot be directly attributed, you can configure a shared cost splitting rule to distribute them. Supported methods typically include equal splitting, proportional splitting, or custom ratio splitting.

Cannot select items in a rule

Cost Center rules are typically configured based on dimensions that appear in your billing data. If an account has not generated any billing data recently, you may not be able to select the corresponding sub-account, resource group, or tag from the drop-down list. Ensure that the account has generated billing data before you configure the rule.

Unallocated costs in bills but no unallocated resources

Check if your rules are set for a specific effective billing cycle. Also, confirm whether the account and instance ID associated with the unallocated costs can be found in the resource list (All Resources or Unallocated Resources) of your Cost Center.