หน้านี้ยังไม่พร้อมใช้งานในภาษาท้องถิ่นของคุณ เรากำลังพยายามอย่างหนักเพื่อเพิ่มเวอร์ชันภาษาอื่น ๆ เพิ่มเติม ขอบคุณสำหรับการสนับสนุนเสมอมา

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 Usage Details (Old)

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

Function

This API can be used to query usage details 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.
  • NOTE:
    • This API will be taken offline. For details about the new API for querying resource usage details, see Viewing Resource Usage Details.
    • After a customer associates with an enterprise master in the unified accounting model, bill queries will return both bills before and after the association.
    • You can query data from the past three years.

URI

GET /v1.0/{domain_id}/customer/account-mgr/bill/res-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/Value Range

Description

cycle

Yes

String

A maximum of 8 characters

Billing cycle. The value is in "YYYY-MM" format.

Example: 2020-01

cloudServiceTypeCode

No

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.

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

resourceTypeCode

No

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.

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

resInstanceId

No

String

A maximum of 256 characters

Resource instance ID.

payMethod

Yes

String

A maximum of 4 characters

Payment method. The options are:

  • 0: Yearly/monthly
  • 1: Pay-per-use
  • 10: Reserved instance

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

offset

Yes

Integer

[1-Maximum integer]

Page number.

limit

Yes

Integer

[1-1000]

Page limit.

Request

Request Parameters

None

Example Request

GET https://bss-intl.myhuaweicloud.com/v1.0/{domain_id}/customer/account-mgr/bill/res-records?cycle=2019-06&payMethod=0&offset=1&limit=10 HTTP/1.1
Content-Type: application/json
X-Auth-Token: MIIPAgYJKoZIhvcNAQcCo...ggg1BBIINPXsidG9rZ

Response

Response Parameters

Parameter

Mandatory

Type

Maximum Length of Characters

Description

error_code

No

String

A maximum of 16 characters

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

error_msg

No

String

A maximum of 1024 characters

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

monthlyRecords

No

List<MonthlyRecord>

N/A

Resource usage record.

For details, see Table 3.

totalCount

No

Int

N/A

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

currency

No

String

A maximum of 3 characters

Currency.

USD

Table 3 MonthlyRecord

Parameter

Mandatory

Type

Maximum Length of Characters/Value Range

Description

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.

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.

resourceTypeCode

No

String

A maximum of 256 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.

resInstanceId

No

String

A maximum of 256 characters

Resource instance ID.

resourceName

No

String

-

Resource name. When creating a resource, a customer can enter the resource name. Some resource names can also be changed during resource management.

resourceTag

No

String

A maximum of 8,192 characters

Resource tag. Customers can set tags when managing resources.

consumeAmount

No

Number

-

Amount of expenditures of a customer on cloud services, including the cash coupons. The value of this parameter is accurate to twotwo decimal places.

cycle

No

String

-

Expenditure month.

measureId

No

Integer

[1-2]

Unit.

  1. USD
  2. Cent

enterpriseProjectId

No

String

-

Enterprise project ID.

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

payMethod

No

String

[0-1]

Billing mode.

0: Yearly/monthly

1: Pay-per-use

10: Reserved instance

officialAmount

No

Number

-

Standard price.

Example Response

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

{
	"monthlyRecords": [{
			"cloudServiceTypeCode": "hws.service.type.marketplace",
			"regionCode": "cn-north-1",
			"resourceTypeCode": "hws.resource.type.marketplace",
			"resInstanceId": null,
			"resourceName": null,
			"resourceTag": null,
			"consumeAmount": 0,
			"cycle": "2019-06",
			"measureId": 3,
			"enterpriseProjectId": null,
			"payMethod": "0",
                        "officialAmount": 10
		},
		{
			"cloudServiceTypeCode": "hws.service.type.marketplace",
			"regionCode": "cn-north-1",
			"resourceTypeCode": "hws.resource.type.marketplace",
			"resInstanceId": "00*****aae",
			"resourceName": null,
			"resourceTag": null,
			"consumeAmount": 600,
			"cycle": "2019-06",
			"measureId": 3,
			"enterpriseProjectId": null,
			"payMethod": "0",
                        "officialAmount": 10
		},
		{
			"cloudServiceTypeCode": "hws.service.type.ebs",
			"regionCode": "cn-north-1",
			"resourceTypeCode": "hws.resource.type.volume",
			"resInstanceId": "005*****1b8c",
			"resourceName": null,
			"resourceTag": null,
			"consumeAmount": 10000,
			"cycle": "2019-06",
			"measureId": 3,
			"enterpriseProjectId": "0",
			"payMethod": "0",
                        "officialAmount": 10
		},
		{
			"cloudServiceTypeCode": "hws.service.type.ebs",
			"regionCode": "cn-north-1",
			"resourceTypeCode": "hws.resource.type.volume",
			"resInstanceId": "06c*****88a",
			"resourceName": null,
			"resourceTag": null,
			"consumeAmount": 10000,
			"cycle": "2019-06",
			"measureId": 3,
			"enterpriseProjectId": "0",
			"payMethod": "0",
                        "officialAmount": 10
		},
		{
			"cloudServiceTypeCode": "hws.service.type.ebs",
			"regionCode": "cn-north-1",
			"resourceTypeCode": "hws.resource.type.volume",
			"resInstanceId": "08*****23",
			"resourceName": null,
			"resourceTag": null,
			"consumeAmount": 9500,
			"cycle": "2019-06",
			"measureId": 3,
			"enterpriseProjectId": "0",
			"payMethod": "0",
                        "officialAmount": 10
		},
		{
			"cloudServiceTypeCode": "hws.service.type.marketplace",
			"regionCode": "cn-north-7",
			"resourceTypeCode": "hws.resource.type.marketplace",
			"resInstanceId": "0fa*****21e",
			"resourceName": null,
			"resourceTag": null,
			"consumeAmount": 400,
			"cycle": "2019-06",
			"measureId": 3,
			"enterpriseProjectId": null,
			"payMethod": "0",
                        "officialAmount": 10
		},
		{
			"cloudServiceTypeCode": "hws.service.type.ebs",
			"regionCode": "cn-north-1",
			"resourceTypeCode": "hws.resource.type.volume",
			"resInstanceId": "0ff*****04d",
			"resourceName": null,
			"resourceTag": null,
			"consumeAmount": 10000,
			"cycle": "2019-06",
			"measureId": 3,
			"enterpriseProjectId": "0",
			"payMethod": "0",
                        "officialAmount": 10
		},
		{
			"cloudServiceTypeCode": "hws.service.type.ebs",
			"regionCode": "cn-north-1",
			"resourceTypeCode": "hws.resource.type.volume",
			"resInstanceId": "1b92*****8c2",
			"resourceName": null,
			"resourceTag": null,
			"consumeAmount": 10000,
			"cycle": "2019-06",
			"measureId": 3,
			"enterpriseProjectId": "0",
			"payMethod": "0",
                        "officialAmount": 10
		},
		{
			"cloudServiceTypeCode": "hws.service.type.marketplace",
			"regionCode": "cn-north-1",
			"resourceTypeCode": "hws.resource.type.marketplace",
			"resInstanceId": "1e4*****6a1",
			"resourceName": null,
			"resourceTag": null,
			"consumeAmount": 600,
			"cycle": "2019-06",
			"measureId": 3,
			"enterpriseProjectId": null,
			"payMethod": "0",
                        "officialAmount": 10
		},
		{
			"cloudServiceTypeCode": "hws.service.type.ebs",
			"regionCode": "cn-north-1",
			"resourceTypeCode": "hws.resource.type.volume",
			"resInstanceId": "295*****448a1",
			"resourceName": null,
			"resourceTag": null,
			"consumeAmount": 10000,
			"cycle": "2019-06",
			"measureId": 3,
			"enterpriseProjectId": "0",
			"payMethod": "0",
                        "officialAmount": 10
		}
	],
	"totalCount": 33,
	"currency": "USD"
}

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.

เราใช้คุกกี้เพื่อปรับปรุงไซต์และประสบการณ์การใช้ของคุณ การเรียกดูเว็บไซต์ของเราต่อแสดงว่าคุณยอมรับนโยบายคุกกี้ของเรา เรียนรู้เพิ่มเติม

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback