Querying the Renewal Price of a Yearly/Monthly Resource
Function
Customers can query the renewal price of a yearly/monthly resource by criteria on the partner sales platform.
- If a primary resource has resources attached, the renewal price will include the price of the primary resource and that of the attached. The information of the attached resources can also be accessed through Querying Customer's Yearly/Monthly Resources.
- Note: When a newly purchased EVS disk is attached to an ECS, the EVS disk is not necessarily an attached resource of the ECS. The precise information of the attached resources can only be accessed through Querying Customer's Yearly/Monthly Resources.
Constraints
Only customer AK/SK can be used to call the API. Since partners are not allowed to buy products with their own accounts, let alone yearly/monthly products.
URI
POST /v2/bills/ratings/period-resources/renew-rate
Request
Request parameters
Parameter |
Mandatory |
Parameter Type |
Value Range |
Description |
---|---|---|---|---|
resource_ids |
Yes |
List<String> |
[1-10] |
Primary resource IDs A maximum of 10 resource IDs are supported. Determine whether a resource is a primary resource or not by the is_main_resource, a response parameter described in Querying Customer's Yearly/Monthly Resources. |
period_type |
Yes |
Integer |
[2|3] |
Period type:
|
period_num |
Yes |
Integer |
[1-11] |
Number of periods:
|
include_relative_resources |
No |
Boolean |
- |
Specifies whether to include associated resources for renewal price querying.
If this parameter is not included in the request or is set to "", the default value false is used. |
POST https://bss.myhuaweicloud.eu/v2/bills/ratings/period-resources/renew-rate HTTP/1.1 Content-Type: application/json X-Auth-Token: MIIPAgYJKoZIhvcNAQcCo...ggg1BBIINPXsidG9rZ { "resource_ids": ["230221_169ee********9d5b8af6a38f099abea"], "period_type": 2, "period_num": 1, "include_relative_resources": false }
Response
Response Parameters
Parameter |
Parameter Type |
Value Range |
Description |
---|---|---|---|
error_code |
String |
A maximum of 20 characters |
Status code For details, see Status Codes. |
error_msg |
String |
A maximum of 1,000 characters |
Error description |
currency |
String |
A maximum of 20 characters |
Currency USD If the parameter is left blank, USD is used. |
renew_inquiry_results |
List<RenewInquiryResultInfo> |
-- |
Renew price inquiry result of the primary resources and their attached resources For details, see Table 1. |
official_website_rating_result |
OfficialWebsiteRatingResult Object |
-- |
For list price of a primary resource and its attached resources, see Table 2. |
optional_discount_rating_results |
List<OptionalDiscountRatingResult> |
-- |
Price inquiry result with an optional discount applied. If there are multiple optional discounts, different price inquiry results can be returned with a different discount applied each time. For details, see Table 3 OptionalDiscountRatingResult. |
fail_resource_infos |
List<FailResourceInfo> |
-- |
Resource information for a failed query. For details, see resource information for a failed query. |
Parameter |
Parameter Type |
Description |
---|---|---|
resource_id |
String |
Resource ID.
NOTE:
If the request contains the include_relative_resources field, the ID of the associated primary resource will be returned. |
amount |
String |
Renewal price of primary resources and their attached resources Unit: USD
NOTE:
If the request contains the include_relative_resources field, the renewal amount of the associated primary resource is returned. |
Parameter |
Parameter Type |
Value Range |
Description |
---|---|---|---|
official_website_amount |
String |
A maximum of 64 characters |
List price Unit: USD |
Resource information for a failed query
Parameter |
Parameter Type |
Description |
---|---|---|
error_code |
String |
Status code For details, see Table Status Codes. |
error_msg |
String |
Error description |
resource_id |
String |
Resource ID. |
Status code: 200
HTTP/1.1 200 OK Content-Type: application/json;charset=UTF-8 Content-Length: length Date: response time { "currency": "CNY", "renew_inquiry_results": [{ "resource_id": "230221_169ee********9d5b8af6a38f099abea", "amount": "800.0" }], "official_website_rating_result": { "official_website_amount": "800.0", "installment_official_website_amount": null, "installment_period_type": null }, "optional_discount_rating_results": [], "fail_resource_infos": [] }
Status Codes
- 4xx: indicates an error resulting from client, such as the request contains bad syntax or an invalid parameter. You need to check the statement and its format and make a request again.
- 5xx: indicates an error to the Huawei Cloud system, which prevented the system from fulfilling the request from client. You can contact Huawei Cloud customer service to handle the issue.
HTTP Status Code |
Error Code |
Description |
---|---|---|
200 |
CBC.30050007 |
Renewal price inquiry is not applicable to non-primary resources. |
200 |
CBC.30050008 |
The period type or number of periods for the resource does not exist. |
200 |
CBC.30050009 |
The resources have expired and been deleted or do not exist. |
200 |
CBC.30050010 |
This operation is not allowed because some resources included in your orders are to be paid. |
200 |
CBC.30050011 |
Resources are being unsubscribed from or changed. |
200 |
CBC.30050013 |
Renewal not supported. |
400 |
CBC.0100 |
Incorrect parameter |
400 |
CBC.99006006 |
The required product cannot be found. |
400 |
CBC.99006024 |
Failed to query product information. |
400 |
CBC.99006016 |
Failed to query coupon information. |
400 |
CBC.99006017 |
Failed to query customer information. |
400 |
CBC.99006050 |
Incorrect usage unit |
400 |
CBC.99006055 |
The queried amount exceeds the upper limit. |
400 |
CBC.99006066 |
Billing query failed |
400 |
CBC.99006073 |
Project not found |
400 |
CBC.30050012 |
There are duplicate resource IDs. |
403 |
CBC.0151 |
Access denied |
403 |
CBC.0154 |
Invalid or expired token |
500 |
CBC.0999 |
Other errors |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.