Creates an instance resource. This operation creates an order for a new instance resource and completes automatic payment. ECS and RDS product series are not supported.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
bss:ModifyInstance |
create |
*All Resource
|
|
None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProductCode |
string |
Yes |
The product code. You can call the QueryProductList operation to query the product code. |
Cdn |
| ProductType |
string |
No |
The product type. |
Cdn |
| SubscriptionType |
string |
Yes |
The billing method. Valid values:
|
Subscription |
| Period |
integer |
No |
The subscription period. Unit: months. For yearly subscription products, specify a multiple of 12. |
12 |
| RenewalStatus |
string |
No |
The auto-renewal status. Valid values:
Default value: ManualRenewal. |
ManualRenewal |
| RenewPeriod |
integer |
No |
The auto-renewal epoch. Unit: months. Note
This parameter is required when you set RenewalStatus to AutoRenewal in Settings. |
12 |
| ClientToken |
string |
No |
The client idempotency token. The server checks whether a request with the same ClientToken has been made. If yes, the server returns the result of the previous call. |
JASIOFKVNVIXXXXXX |
| Logistics |
string |
No |
The logistics address for this order. This parameter is typically valid for orders of physical products. |
{"cityCode":"330100","cityName":"Hangzhou","contactName":"Test","countryCode":"","districtName":"Puyan Street","email":"**@example.com","mobilePhone":"153564848844","phone":"1234567","provCode":"330000","provName":"Zhejiang Province","streetCode":"33010610","streetName":"Zhuantang","zipCode":"0000"} |
| Parameter |
array<object> |
No |
The list of modules. |
|
|
object |
No |
The module information. |
||
| Value |
string |
Yes |
The value of the Nth module property. Valid values of N: 1 to 100. |
disk |
| Code |
string |
Yes |
The code of the Nth module property. Valid values of N: 1 to 100. If multiple module properties exist, concatenate them in the format of N=1, 2, 3...N. |
InstanceType |
| PricingCycle |
integer |
No |
The unit of the subscription period.
Default value: PricingCycle=2. This parameter is applicable only to specific product types (ProductType is ddos_originpre_public_cn, ddosDip, ddoscoo, ddos_originpre_public_intl, ddosDip_intl, or ddoscoo_intl). |
2 |
For example, to create an application for the Real-Time Communication (RTC) product by using this operation, specify the following complete parameters:
ProductCode=rtc&SubscriptionType=PayAsYouGo&ProductType=&Parameter.1.Code=ServiceType&Parameter.1.Value=universal&Parameter.2.Code=BillType&Parameter.2.Value=PayByCR&Parameter.3.Code=ServiceAreaCn&Parameter.3.Value=true&Parameter.4.Code=ServiceAreaUs&Parameter.4.Value=false
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
The status code. |
Success |
| Message |
string |
The error message. |
Successful! |
| RequestId |
string |
The request ID. |
C880B065-A781-4F19-B6DD-3E0E3B715C64 |
| Success |
boolean |
Indicates whether the request was successful. |
true |
| Data |
object |
The response data. |
|
| OrderId |
string |
The ID of the order that was created. |
20240xxxx21 |
| InstanceId |
string |
The instance ID associated with the order. |
OSSBAG-cn-v1hxxxxx23 |
Examples
Success response
JSON format
{
"Code": "Success",
"Message": "Successful!",
"RequestId": "C880B065-A781-4F19-B6DD-3E0E3B715C64",
"Success": true,
"Data": {
"OrderId": "20240xxxx21",
"InstanceId": "OSSBAG-cn-v1hxxxxx23"
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 200 | INSUFFICIENT.AVAILABLE.QUOTA | The account balance is negative. Add funds to the account and try again. | Your account balance drops below 0. Top up your account and try again. |
| 400 | InvalidOwner | The specified owner doesn't belong to caller. | Invalid user identity. |
| 400 | ORDER.ACCOUNT_STATUS_ILLEGAL | Please complete your basic personal information first. | |
| 400 | 400 | Failure to check order before create instance. | |
| 400 | ORDER.ACCOUNT_INFORMATION_INCOMPLETE | Your information is incomplete. Complete your information before ordering | |
| 500 | InternalError | The request processing has failed due to some unknown error. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.