Creating a CBH Instance Subscription Order
Function
This API is used to create a CBH Instance subscription order.
URI
POST /v1/{project_id}/cbs/period/order
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. You can obtain the project ID by referring to https://support.huaweicloud.com/intl/en-us/api-cbh/cbh_02_0020.html. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
instance_key |
Yes |
Integer |
CBH instance ID. |
cloud_service_type |
Yes |
String |
Cloud service type. Default value: hws.service.type.cbh |
region_id |
Yes |
String |
CBH instance region ID. |
charging_mode |
Yes |
Integer |
Billing mode. - 0: Yearly/Monthly |
period_type |
Yes |
Integer |
Subscription type
|
period_num |
Yes |
Integer |
Number of subscription periods.
|
product_infos |
Yes |
Array of ProductInfos objects |
Product information |
is_auto_renew |
Yes |
Integer |
Specifies whether auto renew is enabled.
|
subscription_num |
Yes |
Integer |
Number of subscriptions. The value is greater than 0. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
product_id |
Yes |
String |
Product ID, which is obtained by calling the inquiry API. |
cloud_service_type |
Yes |
String |
Cloud service type. The value is fixed at hws.service.type.cbh. |
resource_type |
Yes |
String |
CBH resource type. The value is fixed at hws.resource.type.cbh.ins. |
resource_spec_code |
Yes |
String |
CBH instance specification ID. The format is "cbh.Edition.Asset specifications", for example:
|
resource_size_measure_id |
Yes |
String |
Resource capacity measurement ID. The options are as follows:
|
resource_size |
Yes |
String |
Resource capacity. The default value is 1. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
order_id |
String |
Order ID. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error Code |
error_description |
String |
Incorrect request parameter. |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error Code |
error_description |
String |
Failed to verify the token. |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error Code |
error_description |
String |
Permissions required. |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error Code |
error_description |
String |
CBH instances not found. |
Example Requests
{ "instance_key" : 6946, "cloud_service_type" : "hws.service.type.cbh", "region_id" : "cn-north-4", "charging_mode" : 0, "period_type" : 2, "period_num" : 1, "product_infos" : [ { "product_id" : "OFFI740586375358963717", "cloud_service_type" : "hws.service.type.cbh", "resource_type" : "hws.resource.type.cbh.ins", "resource_spec_code" : "cbh.basic.50", "resource_size_measure_id" : "14", "resource_size" : "1" } ], "is_auto_renew" : 0, "subscription_num" : 1 }
Example Responses
Status code: 200
Cbh CreateInstanceOrder Success
{ "order_id" : "CS22121916213LOXW" }
Status Codes
Status Code |
Description |
---|---|
200 |
Cbh CreateInstanceOrder Success |
400 |
Bad Request |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
Error Codes
See Error Codes.
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