Renewing Subscription to Yearly/Monthly Resources
Function
A customer can renew subscription to yearly/monthly resources on the self-built platform.
When subscription to yearly/monthly resources of a customer is about to expire, the customer can renew the subscription to the resources.
Customers can follow the instructions described in Manually Renewing a Resource to renew the subscription to the yearly/monthly resources in Billing Center.
- If a primary resource has resources attached, the system renews the subscription to both the primary resource and its attached ones after this API is invoked. You can invoke Querying Customer's Yearly/Monthly Resources to obtain the details of the attached resources.
- If a newly purchased EVS disk is attached to an ECS, but this disk is not the attached to any of the ECS primary resources, you must invoke Querying Customer's Yearly/Monthly Resources to obtain the details of the ECS primary resources and its attached ones.
- This API supports automatic payment. For details about how to use discounts or coupons during payment, see Support for Discounts or Coupons.
Constraints
This API can be invoked only by the customer AK/SK or token.
Debugging
You can debug the API in API Explorer which supports automatic authentication. API Explorer can automatically generate and debug example SDK code.
URI
POST /v2/orders/subscriptions/resources/renew
Request
Request Parameters
Parameter |
Mandatory |
Type |
Value Range |
Description |
---|---|---|---|---|
resource_ids |
Yes |
List<String> |
[1-10] |
Resource IDs. Only the primary resource ID is supported. A maximum of 10 resource IDs can be configured. To determine the primary resources, query is_main_resource in the response of the API described in Querying Customer's Yearly/Monthly Resources. |
period_type |
Yes |
Integer |
2, 3 |
Period type. The value can be:
|
period_num |
Yes |
Integer |
1 to 11 |
Number of periods.
|
expire_policy |
No |
Integer |
0 to 3 |
Expiration policy. This field has been discarded. Do not use this field. This parameter will not take effect.
|
is_auto_pay |
No |
Integer |
0, 1 |
Whether enable automatic payment.
If this parameter is not included or is set to null, the default value 0 is used, indicating not to enable the automatic payment. The rules for auto payment are consistent with those for auto renewal. For details about the rules for auto payment, see Auto-Renewal Rules. |
POST https://bss-intl.myhuaweicloud.com/v2/orders/subscriptions/resources/renew HTTP/1.1 Content-Type: application/json X-Auth-Token: MIIPAgYJKoZIhvcNAQcCo...ggg1BBIINPXsidG9rZ { "resource_ids": [ "96308d5efd7841b9a4dac673d84d0e14" ], "period_type": 2, "period_num": 1, "expire_policy": 1, "is_auto_pay": 0 }
Response
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
order_ids |
List<String> |
List of order IDs generated when resource subscription is renewed. |
fail_resource_infos |
List<FailResourceInfo> |
List of resources that failed to be renewed. This parameter has a value only when there are resources that fail to be renewed. For details, see Table 2. This parameter is reserved. |
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. For details, see Error Codes. This parameter is reserved. |
error_msg |
String |
Error description. This parameter is reserved. |
resource_id |
String |
Resource ID. This parameter is reserved. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Status code. For details, see Returned Values. |
error_msg |
String |
Error description. |
order_ids |
List<String> |
List of order IDs generated when resource subscription is renewed. |
expiredResourceIds |
List<String> |
List of expired or non-existent resources. This parameter has a value only when the error code is CBC.99003016. |
HTTP/1.1 200 OK Content-Type: application/json;charset=UTF-8 Content-Length: length Date: response time { "order_ids": [ "CS19040119281JMYC" ], "fail_resource_infos":[] }
Returned Values
- 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 Value |
Error Code |
Description |
---|---|---|
400 |
CBC.0100 |
Parameter error. |
400 |
CBC.30010036 |
Renewal is only supported for primary resources. |
400 |
CBC.30010069 |
The renewal period does not exist. |
400 |
CBC.30050006 |
Automatic order payment failed. |
400 |
CBC.99000092 |
Incorrect subscription period. |
400 |
CBC.99003100 |
This operation is not allowed because some resources are included in your orders to be paid. |
400 |
CBC.7281 |
Renewal, payment, or unsubscription not supported. Your account has been frozen. |
400 |
CBC.99003016 |
The resources have expired and been deleted or do not exist. |
400 |
CBC.99003144 |
You have orders in progress and cannot perform the current operation. |
400 |
CBC.99003154 |
The sum of the existing and renewal durations has exceeded the maximum allowed. Select another renewal duration. |
400 |
CBC.99003634 |
Resources in discount packages must be renewed as a whole and cannot be renewed together with other resources. |
403 |
CBC.0151 |
Access denied. |
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.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot