Purchases products. This operation supports pay-as-you-go purchases of DataWorks, OSS, PAI, and MaxCompute.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
pai:CreateOrder |
create |
*All Resource
|
None | None |
Request syntax
POST /api/v1/productorders HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The purchase request. |
|
| AutoPay |
boolean |
No |
Specifies whether to automatically pay for all products listed in the Products parameter.
|
true |
| Products |
array<object> |
No |
The list of products to purchase. |
|
|
array<object> |
No |
The product to purchase. |
||
| AutoRenew |
boolean |
No |
Specifies whether to enable auto-renewal.
Valid values:
|
true |
| ProductCode |
string |
No |
The product code. The following codes are supported:
Valid values:
|
DataWorks_share |
| ChargeType |
string |
No |
The billing method. Currently, only POSTPAY is supported. Valid values:
|
POSTPAY |
| OrderType |
string |
No |
The order type. Currently, only BUY is supported. Valid values:
|
BUY |
| PricingCycle |
string |
No |
The billing cycle. The following values are supported:
Valid values:
|
Month |
| Duration |
integer |
No |
The subscription duration. This parameter is used with PricingCycle. Currently, only a value of 1 is supported. |
1 |
| InstanceProperties |
array<object> |
No |
The list of instance properties.
|
|
|
object |
No |
The instance property information. |
||
| Code |
string |
No |
The code of the instance property. |
commodity_type |
| Name |
string |
No |
The name of the instance property. |
对象存储OSS |
| Value |
string |
No |
The value of the instance property. |
oss |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response struct. |
||
| RequestId |
string |
The request ID. |
ksdjf-jksd-*****slkdjf |
| OrderId |
string |
The ID of the purchase order. |
210292536260646 |
| Message |
string |
The message returned for the purchase. |
正常 |
| BuyProductRequestId |
string |
The ID of the product purchase request. |
3ed6a882-0d85-4dd8-ad36-cd8d74ab9fdb |
| ProductIds |
array |
||
|
string |
Examples
Success response
JSON format
{
"RequestId": "ksdjf-jksd-*****slkdjf",
"OrderId": "210292536260646",
"Message": "正常",
"BuyProductRequestId": "3ed6a882-0d85-4dd8-ad36-cd8d74ab9fdb",
"ProductIds": [
""
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.