Customer Operation Capabilities
| Details
  • Registering a Customer (Partner)
    • CheckUserIdentity
    • CreateSubCustomer
    • SendVerificationMessageCode
  • Managing Customers (Partner)
    • FreezeSubCustomers
    • ListSubCustomers
    • UnfreezeSubCustomers
  • Real-Name Authentication (Partner)
    • ChangeEnterpriseRealnameAuthentication
    • CreateEnterpriseRealnameAuthentication
    • CreatePersonalRealnameAuth
    • ShowRealnameAuthenticationReviewResult
  • Managing Coupons (Public)
    • ListSubCustomerCoupons
  • Managing Customer Budgets (Partner)
    • ListSubCustomerBudget
    • ShowSubCustomerBudget
    • UpdateSubCustomerBudget
  • Managing Accounts (Customer)
    • ShowCustomerAccountBalances
  • Purchasing a Cloud Service (Public)
    • ListFreeResourceUsages
    • ListOnDemandResourceRatings
    • ListRateOnPeriodDetail
    • ListRenewRateOnPeriod
  • Managing Yearly/Monthly Orders (Public)
    • ListCustomerOrders
    • ShowCustomerOrderDetails
    • ShowRefundOrderDetails
  • Managing Yearly/Monthly Orders (Customer)
    • AutoRenewalResources
    • CancelAutoRenewalResources
    • CancelCustomerOrder
    • CancelResourcesSubscription
    • ListOrderDiscounts
    • ListPayPerUseCustomerResources
    • PayOrders
    • RenewalResources
    • UpdatePeriodToOnDemand
  • Managing Pay-Per-Use Resources (Partner)
    • ListCustomerOnDemandResources
  • Managing Bills (Partner)
    • ListPostpaidBillSum
  • Managing Bills (Customer)
    • ListCustomerselfResourceRecordDetails
    • ListCustomerselfResourceRecords
    • ListMonthlyExpenditures
  • Managing Enterprise Projects (Customer)
    • CreateEnterpriseProjectAuth
  • Managing Enterprise Accounts (Customer)
    • ListEnterpriseSubCustomers
  • Managing Products (Public)
    • ListConversions
    • ListMeasureUnits
    • ListResourceTypes
    • ListServiceResources
    • ListServiceTypes
    • ListUsageTypes
  • Managing Resource Packages (Customer)
    • ListFreeResourceInfos
    • ListFreeResourcesUsageRecords
  • Managing Huawei Cloud Resellers (Partner)
    • ListIndirectPartners
  • Cost Management (Customer)
    • ListCosts
  • Managing Credits(Partner)
    • ShowPartnerConsumptionQuota
  • Managing Invoices (Public)
    • ListInvoices

ListCustomerOnDemandResources

POST
https://bss-intl.myhuaweicloud.com/v2/partners/sub-customers/on-demand-resources/query
Advanced
Required parameters only
Default
Encrypt sensitive parameters
*
Region
Headers
*
Authorization
*
X-Language
Body
*{
*
customer_id
:
*
region_code
:
*
service_type_code
:
*
resource_ids
: [
+Add
*]
*
effective_time_begin
:
*
effective_time_end
:
*
offset
:
*
limit
:
*
status
:
*
indirect_partner_id
:
}
API Description

A partner can query the pay-per-use resources that have been provisioned for customers associated with the partner in reseller model.

Constraints

This API can be invoked using the partner AK/SK or token only.The data obtained using this API is for reference only because it has a delay, and the delay for each cloud service is different.

URL
POST  https://bss-intl.myhuaweicloud.com/v2/partners/sub-customers/on-demand-resources/query
Request Parameters
NameTypeINMandatoryDescription
X-Language
stringheader No

Language:zh_CN: Chinese.en_US: English.Default value: zh_CN

X-Auth-Token
stringheader Yes

Call with partner token

Body Parameters
NameTypeMandatoryDescription
customer_id
string Yes

Customer account ID. To obtain the customer ID, call the API in Querying Customers.

region_code
string No

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

service_type_code
string No

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.

resource_ids
Array of strings No

Queries resource IDs in batches. This parameter is used to query the resource of a specified resource ID. A maximum of 50 IDs can be configured at a time.

effective_time_begin
string No

Start time of the validity period. UTC time in "yyyy-MM-dd'T'HH:mm:ss'Z'" format, such as 2019-05-06T08:05:01Z. The range of HH is 0-23, and the range of mm and ss is 0-59.

effective_time_end
string No

End time of the validity period. UTC time in "yyyy-MM-dd'T'HH:mm:ss'Z'" format, such as 2019-05-06T08:05:01Z. The range of HH is 0-23, and the range of mm and ss is 0-59.

offset
integer No

Offset, which starts from 0. The default value is 0. NOTE: This parameter is used for pagination. Retain its default value 0 if pagination is not required. offset indicates the offset relative to the first data record among all that meets the conditions configured. If you set offset to 1, the second and subsequent data records are returned. For example, there are 10 data records, and if you set limit to 10 and offset to 1, the second to the tenth data records are returned.

limit
integer No

Number of records queried each time. The default value is 10.

status
integer No

Resource status. 1: Normal (provisioned)2: Grace period3. Freezing4: Changing5: Canceling6: Canceled

indirect_partner_id
string No

Reseller ID. This parameter is mandatory only when a distributor queries pay-per-use resources of customers associated with its resellers. Otherwise, the pay-per-use resources of the distributor's own customers will be queried.

Response Parameters
Status code: 200

ListCustomerOnDemandResources Responses

NameTypeDescription
resources
Array of CustomerOnDemandResource objects

Customer resources. For details, see Table 2.

total_count
integer

Total number of query records.

200 resources
NameTypeDescription
customer_id
string

Customer account ID.

region_code
string

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

availability_zone_code
string

AZ code.

service_type_code
string

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.

resource_type_code
string

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.

service_type_name
string

Cloud service type. For example, the cloud service type of ECS is Elastic Cloud Server.

resource_type_name
string

Resource type. For example, the resource type of ECS is Cloud Host.

resource_id
string

Resource ID.

resource_name
string

Resource instance name.

effective_time
string

Effective time. UTC time in "yyyy-MM-dd'T'HH:mm:ss'Z'" format, such as 2019-05-06T08:05:01Z. The range of HH is 0-23, and the range of mm and ss is 0-59. UTC time in "yyyy-MM-dd'T'HH:mm:ss'Z'" format, such as 2019-05-06T08:05:01Z. The range of HH is 0-23, and the range of mm and ss is 0-59.

expire_time
string

Expiration time. UTC time in "yyyy-MM-dd'T'HH:mm:ss'Z'" format, such as 2019-05-06T08:05:01Z. The range of HH is 0-23, and the range of mm and ss is 0-59. UTC time in "yyyy-MM-dd'T'HH:mm:ss'Z'" format, such as 2019-05-06T08:05:01Z. The range of HH is 0-23, and the range of mm and ss is 0-59.

status
integer

Resource status. 1: Normal (provisioned)2: Grace period3. Freezing4: Changing5: Canceling6: Canceled

resource_spec_code
string

Specification of a cloud service resource. For example, a VM resource specification is s2.small.1.linux (.win or .linux should be added at the end of the specification).

resource_info
string

Capacity of pay-per-use resources. The value is in "resourceInfo": "{\"specSize\":40.0}" format.

product_spec_desc
string

Product specification description. Example: ECS: General computing-plus c6.2xlarge.4 8 vCPUs 32 GB LinuxDisk: EVS_SATA_LXH01 40.0 GB

Status code: 400

CBC.0100:parameter error

Example Request
Example 1
"POST https://bss-intl.myhuaweicloud.com/v2/partners/sub-customers/on-demand-resources/query"
{ "indirect_partner_id": "051a8a834180d3fb0f25c006b1998800", "offset": 0, "limit": 10, "effective_time_begin": "2020-04-02T08:56:26Z", "effective_time_end": "2020-05-02T08:56:26Z", "customer_id": "0846606cf580d45f0fd6c01e10c07540", "service_type_code": "hws.service.type.ebs", "resource_ids": [ "batch-volume-16380-00024604" ], "region_code": "cn-east-2", "status": 1 }
Example Response
Status code: 200

ListCustomerOnDemandResources Responses

Example 1
{
"resources": [
{
"customer_id": "0846606cf580d45f0fd6c01e10c07540",
"region_code": "cn-east-2",
"availability_zone_code": "cn-east-2-a",
"service_type_code": "hws.service.type.ebs",
"resource_type_code": "hws.resource.type.volume",
"resource_id": "batch-volume-16380-00024604",
"resource_name": "batch-volume",
"effective_time": "2020-04-02T08:56:26Z",
"expire_time": "2020-05-02T08:56:26Z",
"status": 1,
"resource_spec_code": "SATA",
"resource_info": "{\"specSize\":2235.0}",
"product_spec_desc": "High IO|40.0GB"
}
],
"total_count": 1
}
SDK
Click Customer Operation Capabilities (BSSINTL) SDK to download the SDK in your programming language or view the SDK documentation. To learn how to install an SDK and perform authentication, read Usage.
Error Code

Outline

API Description
Constraints
URL
Request Parameters
Response Parameters
Example Request
Example Response
SDK
Error Code