Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Enabling Data Storage

Updated on 2025-02-24 GMT+08:00

You can enable expenditure data storage by creating a bucket on Object Storage Service (OBS). Huawei Cloud will synchronize your bills to the designated bucket on OBS.

NOTE:
  • The bill data storage service is upgraded to provide more detailed bill data. If you have enabled the old version of the bill data storage service, you can click the button in the upper right corner of the page to experience the new version of the service.

    The new version of the bill data storage service does not affect the old version. If you want to switch to the new version, disable the old version.

  • If you enabled the data storage service or update the push settings after 04:00, Huawei Cloud will not send your bills of the previous day.

    For example, if you enabled the data storage service at 08:10 on February 10, 2024, you will not receive the bills of February 09, 2024.

Enabling Bill Subscription

  1. Create a bucket on OBS. For details about how to create a bucket, see Creating a Bucket.
  2. Log in to the Billing Center.
  3. Go to the Expenditure Data Storage page.
  4. Set the bucket name.

    NOTE:

    If the bucket becomes invalid, expenditure data storage is automatically disabled.

  5. Click Verify.

    A message indicating that the verification is successful is displayed and all eligible bills are presented.

  6. Select the bills that you want to export and click Enable.

    Once authorized and verified, the files for your selected bills will be synchronized to your bucket on OBS every day.

    • Set Push

      If you select the check box, the expenditure data updated upon bill adjustments will be synchronized to your bucket on OBS.

    • Save Bills of Unified Accounting Members

      This field is available only to the master account with unified accounting.

      When this field is set to Yes, Huawei Cloud pushes bills of member accounts to the master account for unified accounting. If this field is set to No, Huawei Cloud does not push bills of member accounts to the master account.

  7. Click Get Code.
  8. Enter the received SMS verification code and click OK.

    NOTE:

    You can click Disable next to the object storage name to close expenditure data storage.

Downloading Subscribed Bills

  1. Choose Service List > Storage > Object Storage Service.
  2. Click the bucket name.

  3. In the navigation bar on the left, click Objects. You can view all files of the subscribed bills that have been exported.

    NOTE:
    • Bills of the same type are sorted in descending order.
    • You can search for bills by bill name prefix. Example: Enter Spendings(ByResource)_201906 in the search box to view all resource bill files in June 2019.
    • Data generated each day for customers in the monthly settlement mode is estimated. It is suggested that these customers obtain the full bill of a month on the fourth day of the next month.

    After expenditure data storage is enabled, data listed in Table 1 will be automatically exported based on your selection.

    Table 1 Exported bills

    Bill

    Billing Period

    Data to Be Exported

    Filename Identifier

    Resource bill by billing cycle

    (applicable to the new version)

    Every day

    Data of the month (prior to the day on which the data is exported)

    %account name%_InstanceBillMonth_YYYYMM

    Third day of each month

    Data of the last month

    Detail bill by usage type

    (applicable to the new version)

    Every day

    Data of the previous day

    %account name%_PriceFactorBillDetail_YYYYMMDD

    Third day of each month

    Data of the last month

    %account name%_PriceFactorBillDetail_YYYYMMDD-YYYYMMDD

    Resource Expenditures

    (applicable to the old version)

    Every day

    Resource expenditure data of the previous day

    Resource_Expenditures_YYYYMMDD

    Third day of each month

    Pay-per-use expenditure data of the last month (for example, data of CDN expenditure charged based on daily average peak bandwidth).

    NOTE:

    Such data is not displayed if there is no monthly-settled pay-per-use products.

    Resource_Expenditures(Pay-per-Use)_MonthlyBill_YYYYMM

    Spendings (By Resource)

    (applicable to the old version)

    Every day

    Current month (excluding the day on which the data is exported)

    Spendings (ByResource)_YYYYMMDD

    Third day of each month

    Last month (YYYYMMDD in the file name indicates the last day of the last month)

    Spendings (ByResource)_YYYYMMDD

  4. Select the bill you want to download and click Download in the Operation column.

Further Description

If you want to download subscribed bills every day, run the following script to set it up. After the setup is completed, the subscribed bills will be automatically downloaded.

NOTE:

The following code example is for reference only. You can make changes to it for development as needed.

#!/usr/bin/python
# -*- coding:utf-8 -*-
import string,os,sys,datetime
import commands
import json

#get date 
date = datetime.date.today()-datetime.timedelta(1)
str_date = date.strftime("%Y%m%d")

AK = ''
SK = ''
server = ''
bucketName = ''
#prefix="Consumedetails_"+str_date
prefix="Resource_Expenditures_"+str_date
print prefix

from com.obs.client.obs_client import ObsClient
# Constructs a obs client instance with your account for accessing OBS
obsClient = ObsClient(access_key_id=AK, secret_access_key=SK, server=server)

#find which billing
resp=obsClient.listObjects(bucketName,prefix)
#billing name
objectKey=resp.body.contents[0].key
localFileDir='/opt/huawei/zcm/data/'+objectKey
# Download the object to a file
print('Downloading an object to dir:' + localFileDir + '\n')
obsClient.getObject(bucketName, objectKey, downloadPath=localFileDir)

Description of parameters:

  • AK: access key ID on OBS. One AK maps to only one user but one user can have multiple AKs. The OBS system recognizes the users who access the system by their access key IDs. For details about how to obtain the AK and SK, see Obtaining Access Keys (AK and SK).
  • SK: secret access key on OBS. It is used to access OBS. Authentication information is generated for users based on their SKs and request header fields. An SK matches an AK.
  • server: domain name, which is the address of the bucket on the Internet. It can be used for scenarios where the bucket is accessed directly through the domain name, such as cloud application development and data sharing. You can obtain its value from "1" in Figure 1.
  • bucketName: name of the bucket used for the subscribed bills. You can obtain its value from "2" in Figure 1.
  • prefix: bills that need to be automatically downloaded.
    • "Resource_Expenditures_": Indicates resource expenditure records.
    • "Spendings (ByResource)_": Indicates the resource bill.
  • localFileDir: local directory for storing downloaded bill files.
    Figure 1 Obtaining parameters for automatically downloading subscribed bills

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback