Creates an instance.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CreateInstance |
The operation that you want to perform. Set the value to CreateInstance. |
ChargeType | String | Yes | POSTPAY |
Set the value to POSTPAY. You can create only pay-as-you-go instances. |
Component | String | Yes | "{\"operable\":\"false\",\"max_cu\":\"8\",\"instance_name\":\"api-test-9\",\"min_cu\":\"0\",\"engine\":\"spark\",\"region\":\"cn-hangzhou\",\"app_name\":\"xx\",\"app_version_name\":\"xx\"}" |
JSON serialization of the component module. |
InstanceType | String | Yes | CU_PRESTO |
The type of the instance. Valid values:
|
RegionId | String | Yes | China (Beijing) |
The region ID. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
ErrorCode | String | 600 |
The error code. |
ErrorInfo | String | An internal error occurred |
The error message. |
RequestId | String | 312F48C7-AFA0-46AA-B8F6-1B16B8808045 |
The ID of the request. |
Result | String | success |
The result returned when the instance is created. |
Success | Boolean | true |
Indicates whether the request is successful. |
Examples
Sample requests
http(s)://[Endpoint]/? Action=CreateInstance
&ChargeType=POSTPAY
&Component="{\"operable\":\"false\",\"max_cu\":\"8\",\"instance_name\":\"api-test-9\",\"min_cu\":\"0\",\"engine\":\"spark\",\"region\":\"cn-hangzhou\",\"app_name\":\"xx\",\"app_version_name\":\"xx\"}"
&InstanceType=CU_PRESTO
&RegionId=China (Beijing)
&<Common request parameters>
Sample success responses
XML
format
<requestId>312F48C7-AFA0-46AA-B8F6-1B16B8808045</requestId>
<result>true</result>
<success>true</success>
JSON
format
{"requestId":"312F48C7-AFA0-46AA-B8F6-1B16B8808045","result":"true","success":true}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
600 | Openanalytics.Internal.Exception | An internal error occurred. | The error message returned because an internal error has occurred. |
401 | Openanalytics.Unauthorized.Exception | You do not have permission to perform the operation. | The error message returned because you are not authorized to perform the operation. |
404 | Openanalytics.NotFound.Exception | The specified instance does not exist. | The error message returned because the specified instance does not exist. |
For a list of error codes, visit the API Error Center.