API Name
CreateInstance
Overview
You can call this operation to create an instance. When you make the API request, the system generates a corresponding order and pays for this order automatically. This api does not support ECS & RDS instance.
Request parameters
Name |
Type |
Required |
Description |
OwnerId |
Long |
No |
The ID of the owner, which is a 16-digit number. The parameter is required if the owner is a reseller or a distributer. |
ProductCode |
String |
Yes |
The code of the specified product. |
ProductType |
String |
No |
The type of the specified product. |
SubscriptionType |
String |
Yes |
The type of billing method. Valid values: Subscription, PayAsYouGo |
ClientToken |
String |
No |
Guarantees the idempotence of the request. The value is generated by a client and must be globally unique. Only ASCII characters are allowed. It can contain a maximum of 64 ASCII characters. |
RenewalStatus |
String |
No |
The renewal status of the specified instance. Valid values: AutoRenewal: auto renewal, ManualRenewal: manual renewal, Default value: ManualRenewal |
Period |
Integer |
No |
The cycle of the subscription billing method. You must specify this parameter when creating a subscription instance. |
RenewPeriod |
Integer |
No |
The cycle of auto renewal. Unit: months. This parameter is required when RenewalStatus is set to AutoRenewal. |
Parameter.n.Code |
String |
No |
The code of the nth parameter. Valid values of n: [1,100]. Multiple parameters are concatenated in the order of n=1,2,3…n. |
Parameter.n.Value |
String |
No |
The value of the nth parameter. Valid values of n: [1,100]. |
Response parameters
Name |
Type |
Required |
Success |
Boolean |
Indicates whether the call is successful. |
Code |
String |
The error code of a failed call. |
Message |
String |
The details of the response. |
RequestId |
String |
The GUID generated by Alibaba Cloud for the request. |
Data |
CreateInstanceResponse |
For more information, see the CreateInstanceResponse data dictionary. |
Error codes
Error code |
Description |
HTTP status code |
Description |
NotApplicable |
This API is not applicable for caller. |
400 |
The error message returned when you are not authorized to use the API. |
MissingParameter |
The specified parameter xx is mandatory for this request. |
400 |
The error message returned when the xx parameter is not specified. |
InvalidParameter |
The specified parameter xx is not valid. |
400 |
The error message returned when the xx parameter is invalid. |
InvalidModuleCode |
The specified moduleCode is not valid. |
400 |
The error message returned when the specified moduleCode parameter is invalid. |
InvalidConfigCode |
The specified configCode is not valid. |
400 |
The error message returned when the specified configCode parameter is invalid. |
InvalidOwner |
The specified owner doesn’t belong to caller. |
400 |
The error message returned when the specified owner does not belong to the caller. |
InvalidCaller |
The specified caller doesn’t exists. |
400 |
The error message returned when the caller is invalid. |
InternalError |
The request processing has failed due to some unknown error, exception or failure. |
400 |
The error message returned when an unknown internal error occurs. |
ProductNotFind |
Can not find inquired product, it may not exist. |
400 |
The error message returned when the specified product is invalid. |
Sample requests
Sample responses
Data dictionary
CreateInstanceResponse
Name |
Type |
Description |
OrderId |
Long |
The ID of the order that you created. |
InstanceId |
String |
The ID of the instance of the specified order. |