Creates an instance. If you call this operation, an order for a new instance is created and the order is automatically paid for. You cannot create Elastic Compute Service (ECS) instances or ApsaraDB RDS instances by calling the operation.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
bssapi:CreateInstance | Write |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ProductCode | string | Yes | The code of the service to which the instance belongs. You can query the service code by calling the QueryProductList operation or viewing Codes of Alibaba Cloud Services. | rds |
ProductType | string | No | The type of the service. | rds |
SubscriptionType | string | Yes | The billing method. Valid values:
| Subscription |
Period | integer | No | The subscription duration. Unit: month. The value must be an integral multiple of 12. Note
This parameter is required if you create a subscription instance.
| 12 |
RenewalStatus | string | No | The renewal method. Valid values:
Default value: ManualRenewal. | ManualRenewal |
RenewPeriod | integer | No | The auto-renewal period. Unit: month. Note
This parameter is required if the RenewalStatus parameter is set to AutoRenewal.
| 12 |
ClientToken | string | No | The client token that is used to ensure the idempotence of the request. The server checks whether a request that uses the same client token has been received. If a request that uses the same client token has been received, the server returns the same request result as the previous request. | JASIOFKVNVIXXXXXX |
Logistics | string | No | The logistics address of this order. This parameter is generally valid for physical orders. | {"cityCode":"330100","cityName":"Hangzhou","contactName":"Test","countryCode":"","districtName":"Puyan Street","email":"\*\*@example.com","mobilePhone":"153564848844","phone":"1234567","provCode":"330000","provName":"Zhejiang","streetCode":"33010610","streetName":"Zhuantang","zipCode":"0000"} |
Parameter | object [] | No | The details of the modules. | |
Value | string | Yes | The value property of the Nth module. Value of N: 1 to 100. | disk |
Code | string | Yes | The code property of the Nth module. Value of N: 1 to 100. If multiple module property parameters are involved, concatenate multiple parameters based on the value of N in sequence. | InstanceType |
Response parameters
Examples
Sample success responses
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 |
---|---|---|---|
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. | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
2023-08-22 | The Error code has changed | see changesets | ||||||||
|