El contenido no se encuentra disponible en el idioma seleccionado. Estamos trabajando continuamente para agregar más idiomas. Gracias por su apoyo.

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
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

Viewing Resource Expenditures (Old)

Updated on 2024-10-29 GMT+08:00

Function

This API can be used to query expenditures of each resource for a customer on the self-built platform.

Note:

  • This API can be invoked only using the AK/SK or token of the customer.
  • This API can be used to query resource expenditure records generated in the same month.
  • Customers can use this API to query resource expenditures, but enterprise members cannot.
NOTE:
  • This API will be brought offline. For details about the new API for querying resource expenditures, see Viewing Resource Expenditures.
  • You can query data from the past three years.

URI

GET /v1.0/{domain_id}/customer/account-mgr/bill/res-fee-records

The following table describes the parameters.

Table 1 URI parameters

Parameter

Mandatory

Maximum Length of Characters

Description

domain_id

Yes

A maximum of 64 characters

Customer account ID. For details, see How Do I Obtain Customer's customer_id and domain_id Values?

Table 2 Request parameters

Parameter

Mandatory

Type

Maximum Length of Characters

Description

startTime

Yes

String

A maximum of 10 characters

Start time. The format is yyyy-MM-dd.

NOTE:

The start time and end time must be in the same month.

endTime

Yes

String

A maximum of 10 characters

End time. The format is yyyy-mm-dd.

NOTE:

The start time and end time must be in the same month.

cloudServiceTypeCode

No

String

A maximum of 256 characters

Cloud service type code. For example, the cloud service type code of OBS is hws.service.type.obs. To obtain a specific service type, call the API in Querying Cloud Service Types.

If this parameter is not included in the request parameters or is left empty, it cannot be used as a filter criterion. If it is set to null, it can be used as a filter criterion. This parameter cannot be set to "".

regionCode

No

String

A maximum of 64 characters

Cloud service region code, for example, ap-southeast-1. Obtain the value from the Region column in Regions and Endpoints.

If this parameter is not included in the request parameters or is left empty, it cannot be used as a filter criterion. If it is set to null, it can be used as a filter criterion. This parameter cannot be set to "".

orderId

No

String

A maximum of 64 characters

Order ID.

If this parameter is not included in the request parameters or is left empty, it cannot be used as a filter criterion. If it is set to null, it can be used as a filter criterion. This parameter cannot be set to "".

payMethod

Yes

String

A maximum of 4 characters

Payment method. The options are:

0: Yearly/monthly

1: Pay-per-use

offset

No

Integer

[1-Maximum integer]

Page number.

If this parameter is not included in the request parameters, the value 1 is used. It cannot be set to "" or null, and cannot be left empty.

limit

No

Integer

[1-100]

Number of records on each page.

If this parameter is not included in the request parameters, the value 10 is used. It cannot be set to "" or null, and cannot be left empty.

resourceId

No

String

A maximum of 256 characters

Resource ID,

If this parameter is not included in the request parameters or is left empty, it cannot be used as a filter criterion. If it is set to null, it can be used as a filter criterion. This parameter cannot be set to "".

enterpriseProjectId

No

String

A maximum of 64 characters

Enterprise project ID.

  • 0: ID of a default project
  • – 1: The service does not support enterprise project management.

If this parameter is not included in the request, it cannot be used as a filter criterion. If it is set to null, it can be used as a filter criterion. This parameter cannot be set to "".

Request

Request Parameters

None

Example Request

GET https://bss-intl.myhuaweicloud.com/v1.0/{domain_id}/customer/account-mgr/bill/res-fee-records?startTime=2019-08-01&endTime=2019-08-31&payMethod=0&cloudServiceTypeCode=hws.service.type.ebs&regionCode=cn-north-1&orderId=orderId&offset=1&limit=10&resourceId=hws.service.type.ebs&enterpriseProjectId=pjzV4N9Uq1LWMUgh3fYAhJqUbtd6Ad8yALoRJeDoYGl0jWdZoS8UHbcGBqEin1Ia HTTP/1.1
Content-Type: application/json
X-Auth-Token: MIIPAgYJKoZIhvcNAQcCo...ggg1BBIINPXsidG9rZ

Response

Response Parameters

Parameter

Type

Maximum Length of Characters

Description

error_code

String

A maximum of 16 characters

Error code. For details, see Status Code. This parameter is returned only when a failure occurs.

error_msg

String

A maximum of 1024 characters

Error description. This parameter is returned only when a failure occurs.

feeRecords

List<ResFeeRecord>

-

Resource usage record.

For details, see Table 3.

totalCount

Integer

-

Number of result sets. This parameter is returned only when the query is successful.

currency

String

A maximum of 3 characters

Currency.

USD

Table 3 ResFeeRecord

Parameter

Type

Maximum Length of Characters

Description

createTime

String

A maximum of 32 characters

Time when a fee record is generated.

effectiveTime

String

A maximum of 32 characters

Start time of using the resource corresponding to the fee. This field is valid only when the resource is billed on a pay-per-use basis. It is reserved for resources billed on a yearly/monthly basis.

expireTime

String

A maximum of 32 characters

End time of using the resource corresponding to the fee. This field is valid only when the resource is billed on a pay-per-use basis. It is reserved for resources billed on a yearly/monthly basis.

feeId

String

A maximum of 64 characters

Fee SN.

productId

String

A maximum of 64 characters

Product ID.

productName

String

A maximum of 256 characters

Product name.

orderId

String

A maximum of 64 characters

Order ID. This field is available only for usage records of yearly/monthly resources. This field is left empty for pay-per-use resources.

amount

Number

-

Consumption amount, including the amount of cash coupons. The value is accurate to two decimal places.

measureId

Integer

-

Unit.

  1. USD
  2. Cent

usageAmount

Number

-

Usage.

usageMeasureId

Integer

-

Usage unit. You can call the API in Querying Measurement Units to obtain the value.

freeResourceAmount

Number

-

Package usage.

freeResourceMeasureId

Integer

-

Unit of the package usage. You can call the API in Querying Measurement Units to obtain the value.

cloudServiceTypeCode

String

A maximum of 64 characters

Cloud service type code. For example, the cloud service type code of OBS is hws.service.type.obs. To obtain a specific service type, call the API in Querying Cloud Service Types.

regionCode

String

A maximum of 64 characters

Cloud service region code, for example, ap-southeast-1. Obtain the value from the Region column in Regions and Endpoints.

resourceTypeCode

String

A maximum of 64 characters

Resource type code. For example, the VM resource type code of ECS is hws.resource.type.vm. To obtain a specific resource type, call the API in Querying Resource Types.

payMethod

String

A maximum of 32 characters

Payment method. The options are:

0: Yearly/monthly

1: Pay-per-use

projectID

String

A maximum of 64 characters

Project ID.

projectName

String

A maximum of 256 characters

Project name.

resourceTag

String

A maximum of 8,192 characters

Resource tag.

resourceName

String

A maximum of 256 characters

Resource name.

resourceId

String

A maximum of 128 characters

Resource ID.

feeSourceOperation

Integer

-

Order Type

1: Subscription

2: Renewal

3: Change

4: Unsubscription

5: Pay-per-use

6: Discount

7. Special offer

8: Free

9: Huawei write-offs

17: Expenditure - difference amount (min. guaranteed-actual)

19: Change - specifications upgrade

20: Refund - change (entire server)

21: Refund – change (specification downgrade)

enterpriseProjectId

String

A maximum of 128 characters

Enterprise project ID.

  • 0: ID of a default project
  • null: The service does not support enterprise project management.

periodType

String

-

Period type. The value can be:

19: Year

20: Month

24: Day

25: Hour

5: Minute

6: Second

spot

String

A maximum of 64 characters

Spot instance ID. 2 indicates that the resource is a spot instance.

rIAmount

Number

-

Reserved instance usage.

rIMeasureId

Integer

-

Unit (reserved instance usage).

officialAmount

Number

-

Standard price.

Example Response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: length
Date: response time  

{
	"totalCount": 1,
	"currency": "USD",
	"feeRecords": [{
		"createTime": null,
		"effectiveTime": null,
		"expireTime": null,
		"feeId": null,
		"productId": null,
		"productName": null,
		"orderId": "orderId",
		"amount": null,
		"measureId": 0,
		"usageAmount": null,
		"usageMeasureId": 0,
		"freeResourceAmount": null,
		"freeResourceMeasureId": 0,
		"cloudServiceTypeCode": "hws.service.type.ebs",
		"regionCode": "cn-north-1",
		"resourceTypeCode": null,
		"payMethod": "0",
		"projectID": "04f480425980d32a2f04c018d3326097",
		"projectName": null,
		"resourcetag": null,
		"resourceName": null,
		"resourceId": null,
		"feeSourceOperation": 0,
		"periodType": null,
		"enterpriseProjectId": "pjzV4N9Uq1LWMUgh3fYAhJqUbtd6Ad8yALoRJeDoYGl0jWdZoS8UHbcGBqEin1Ia",
		"spot": null,
		"rIAmount": null,
		"rIMeasureId": 0,
                "officialAmount": 10
	}]
}

Status Code

NOTE:
  • 4xx: This class of HTTP status code is intended for situations in which the error seems to have been caused by the client, for example, the request contains bad syntax or incorrect parameters. You must ensure the request is correct.
  • 5xx: This class of HTTP status code is intended for cases in which the Huawei Cloud server is aware that it has encountered an error or is otherwise incapable of performing the request. In this case, contact Huawei Cloud customer service.

HTTP Status Code

Error Code

Description

400

CBC.0100

Incorrect parameter.

403

CBC.0151

Access denied.

500

CBC.0999

Unknown error.

Utilizamos cookies para mejorar nuestro sitio y tu experiencia. Al continuar navegando en nuestro sitio, tú aceptas nuestra política de cookies. Descubre más

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback