Updated on 2025-08-13 GMT+08:00

Exporting Cost Details to OBS

Cost Center provides your cost data and usage details with cost allocation identifiers. You can create tasks for exporting amortized cost details, original cost details, and cost details (FOCUS 1.0) to OBS. The cost details will then be periodically pushed to the specified OBS bucket.

Important Notes

You can create up to 10 export tasks.

If you are using an enterprise master account, the cost details you export will include your own cost data and the cost data of your member accounts associated for unified accounting management.

  1. The current month's costs are only estimates. Before your bill is generated, export the latest cost details to view the exact amounts. After your bill is generated on the 4th day of the following month, view the exact amounts in the bill.
  2. For the meanings of fields in the exported files, see Export to OBS - Fields for Amortized Costs and Export to OBS - Fields for Original Costs.

Prerequisites

An OBS bucket is available.

If you are an IAM user, ensure that your administrator has granted you the OBS bucket permissions to:

  • Obtain the bucket ACL information.
  • Obtain the bucket policy configuration.
  • Configure a bucket policy.
  • Delete a bucket policy.
  • List all buckets.

Creating an OBS Export Task

  1. Log in to Cost Center.
  2. Choose Cost Insights > Cost Details Export.
  3. On the Export to OBS page, click Create Export Task.
  4. Configure the OBS export task details and click Save.

    You can create OBS export tasks for amortized cost details, original cost details, and cost details (FOCUS 1.0). See the table below.
    Table 1 Field descriptions

    Category

    Field

    Description

    Example

    Task name

    Task Name

    Enter a unique name for each task.

    test

    OBS bucket settings

    Bucket Name

    Select an OBS bucket to store the cost details file from the drop-down list box.

    cost-alpha-test

    Bucket Directory Prefix

    Enter the level-1 directory for storing the cost details file.

    cost

    Export Content

    Content Type

    • Cost details: Create a task for exporting Huawei Cloud cost and usage details.

      When you select Cost details, you can set Cost Type to Original costs or Amortized costs.

      Figure 1 Exporting original costs
      Figure 2 Exporting amortized costs
    • Cost details (FOCUS 1.0): Create a task for exporting Huawei Cloud cost and usage details in accordance with the FinOps Open Cost and Usage Specification Version 1.0 (FOCUS 1.0).

      When you select Cost details (FOCUS 1.0), you can create OBS export tasks for cost details (FOCUS 1.0).

    Cost details

    Content Details

    Data categories: account identity, billing, product, resource package, Savings Plans, cost allocation (including enterprise project, cost tag, and cost category), and splitting items (mandatory if shared cost splitting is enabled)

    Customize Columns: Yes is selected by default.

    • Yes: Include Resource Tag (also referred to as Cost Tag) and Cost Category as fixed columns. Their values are presented by key-value pairs.
    • No: Include each key of a cost tag or cost category as a separated column. The change of any keys will change the file columns.

    /

    Cost Type

    If Content Type is set to Cost details, you can set Cost Type to Original costs or Amortized costs.

    Amortized costs

    Granularity

    Specify the granularity of cost details. By default, the daily granularity is provided.

    • If Content Type is set to Cost details, the granularity can be Daily or Monthly.
    • If Content Type is set to Cost details (FOCUS 1.0), the granularity can only be Daily and cannot be changed.

    Daily

    Start Billing Cycle

    Specify the billing cycle from which you want to start exporting the cost details files to OBS.

    • If Content Type is set to Cost details, the start billing cycle is the current month by default.
    • If Content Type is set to Cost details (FOCUS 1.0), the start billing cycle can only be the current month and cannot be changed.

    Current billing cycle

    File Settings

    Storage Method

    Select the method for storing the exported cost details file. There are two methods:

    • Creating a new file: When a daily cost details file is pushed to OBS, a new folder named after the current calendar date will be created. All the folders are saved by date in the billing cycle directory.
      • The file storage directory will be in the format of {Bucket directory prefix}/{Task name}/{Billing cycle}/{File push time}/{File name}, for example, cost/test/202310/20231016T092614Z/amortized_cost_202310_000001.zip.
    • Overwriting existing files: When a daily cost details file is pushed to OBS, it will overwrite the existing file for the same billing cycle to ensure that only the latest cost detail file will be retained in the billing cycle directory. The file storage directory will be in the format of {Bucket directory prefix}/{Task name}/{Billing cycle}/{File name}, for example, cost/test/202310/amortized_cost_202310_000001.zip.
    NOTE:

    If Content Type is set to Cost details (FOCUS 1.0), the file storage directory will be in the format of {Bucket directory prefix}/{Task name}/{Billing cycle}/{File push time}/{File name}, for example, cost/{test}/202507/20250731T021846Z/FOCUS_COST_202507_000001.zip.

    Creating a new file

    Update Method

    Only Auto update is supported. Cost Center pushes cost details files to the OBS bucket every day as specified. If the cost data in a historical billing cycle has changed, Cost Center will push all of the latest cost data to the directory for that billing cycle.

    Auto update

    File Format

    If Content Type is set to Cost details (FOCUS 1.0), the file format can be csv or Parquet.

    csv

Viewing an OBS Export Task

  1. Log in to Cost Center.
  2. Choose Cost Insights > Cost Details Export.
  3. On the Export to OBS page, view the list of OBS export tasks.

    Field

    Description

    OBS Bucket

    OBS bucket used to store the cost details file.

    Bucket Directory Prefix

    Level-1 directory for storing the cost details file.

    Granularity

    Specify the granularity of cost details.

    Created

    Time when the OBS export task was created.

    Updated

    Last time when the cost details file was exported to the OBS bucket.

    OBS export tasks are executed once a day. If the time for Updated is 24 hours ago, the OBS export task failed to be executed.

    Bucket Directory Example

    Path for obtaining the cost details file from the OBS bucket.

    • If the message shown in the following figure is displayed, the OBS export task failed to be executed. In this case, access the OBS console to check whether the bucket is invalid or whether the bucket policy has been changed. If the bucket is valid and the bucket policy remains unchanged, check whether the bucket is encrypted using server-side encryption. Currently, files cannot be exported to OBS buckets encrypted using server-side encryption.

Obtaining Cost Details

After an OBS export task is created, it is executed once a day. Cost Center pushes the cost details file to the following path in the OBS bucket:

  • Storage Method set to Overwriting existing files: {Bucket directory prefix}/{Task name}/{Billing cycle}/{File name}

    Example: If the task name is test, the bucket directory prefix is cost, and the billing cycle is 202310, then the path for the exported file will be cost/test/202310/amortized_cost_202310_000001.zip.

  • Storage Method set to Creating a new file: {Bucket directory prefix}/{Task name}/{Billing cycle}/{File push time}/{File name}

    Example: If the task name is test, the bucket directory prefix is cost, and the billing cycle is 202310, then the path will be cost/test/202310/20231016T093940Z/original_cost_202310_000001.zip if you export the file on October 16, 2023.

You can directly download the file from the file path or use an API or SDK to obtain the cost details file from the OBS bucket.