Instance Ordering
Function
This API is used to place an order based on the billing mode and billing period.
URI
POST /v1/{project_id}/period/order
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
chargingMode |
No |
Integer |
Billing mode. The options are as follows: 0: yearly/monthly; 1: pay-per-use; 2: one-off. |
cloudServiceType |
No |
String |
Cloud service type |
compositeProductId |
No |
String |
Package ID |
discountId |
No |
String |
Discount ID |
isAutoRenew |
No |
Integer |
Auto-renewal |
periodNum |
No |
Integer |
Subscription periods |
periodType |
No |
Integer |
Subscription period type. The options are as follows: 2: month; 3: year. |
productInfos |
No |
Array of ProductInfoBean objects |
Product information list |
promotionActivityId |
No |
String |
Promotion ID |
promotionInfo |
No |
String |
Promotion information |
regionId |
No |
String |
ID of the region where the current project is, for example, xx-xx-1. |
zone |
No |
String |
Country/Region |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
allResourceNames |
No |
Array of strings |
Resource list |
cloudServiceType |
No |
String |
Cloud service type |
displayId |
No |
String |
Display ID |
productId |
No |
String |
Product ID |
productSpecDesc |
No |
String |
Product specification description |
resourceName |
No |
String |
Resource name |
resourceSize |
No |
Integer |
Number of databases supported by the product or the number of OBS scans supported by the product |
resourceSizeMeasureId |
No |
Integer |
Resource capacity measurement ID. The example values are as follows: 15: mbps (used when bandwidth is purchased), 17: gb (used when EVS disks are purchased), 14: number/time. |
resourceSpecCode |
No |
String |
Product code |
resourceType |
No |
String |
Resource type |
usageFactor |
No |
String |
Coefficient in use |
usageMeasureId |
No |
Integer |
Capacity measurement ID in use |
usageValue |
No |
Double |
Value in use |
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_msg |
String |
Error Message |
Example Requests
Order an instance using the parameters in the request body.
POST /v1/{project_id}/period/order { "chargingMode" : 0, "cloudServiceType" : "hws.service.type.sdg", "isAutoRenew" : 0, "periodNum" : 1, "periodType" : 2, "regionId" : "xxxxxxxxxxxx", "zone" : "CH", "productInfos" : [ { "cloudServiceType" : "hws.service.type.sdg", "productId" : "xxxxxxxxxxxx", "resourceSize" : "xx", "resourceSizeMeasureId" : "xx", "resourceSpecCode" : "base_professional", "resourceType" : "hws.resource.type.dsc.base" } ] }
Example Responses
Status code: 200
OK
{ "order_id" : "xxxxxxxxxxxx" }
Status code: 400
Invalid request.
{ "error_code" : "dsc.40000011", "error_msg" : "Invalid parameter" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
400 |
Invalid request. |
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