Terminates an instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes StopInstance

The operation that you want to perform. Set the value to StopInstance.

InstanceId Long Yes 1234

The ID of the instance. You can call the ListInstances operation to query the ID.

RegionId String Yes cn-shanghai

The region ID. For example, the ID of the China (Shanghai) region is cn-shanghai, and the ID of the China (Zhangjiakou) region is cn-zhangjiakou. The system automatically determines the value of this parameter based on the endpoint that is used to call the operation.

ProjectEnv String Yes PROD

The environment of the workspace. Valid values: PROD and DEV.

Response parameters

Parameter Type Example Description
HttpStatusCode Integer 200

The HTTP status code returned.

Data Boolean true

The result returned.

ErrorMessage String The connection does not exist.

The error message returned.

RequestId String E6F0DBDD-5AD****

The ID of the request. You can use the ID to locate logs and troubleshoot issues.

ErrorCode String Invalid.Tenant.ConnectionNotExists

The error code returned.

Success Boolean true

Indicates whether the request is successful.

Examples

Sample requests

http(s)://[Endpoint]/?Action=StopInstance
&InstanceId=1234
&ProjectEnv=PROD
&RegionId=cn-shanghai
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<StopInstanceResponse>
    <RequestId>E6F0DBDD-5AD****</RequestId>
    <HttpStatusCode>200</HttpStatusCode>
    <Data>true</Data>
    <ErrorCode>Invalid.Tenant.ConnectionNotExists</ErrorCode>
    <ErrorMessage>The connection does not exist.</ErrorMessage>
    <Success>true</Success>
</StopInstanceResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "E6F0DBDD-5AD****",
  "HttpStatusCode" : 200,
  "Data" : true,
  "ErrorCode" : "Invalid.Tenant.ConnectionNotExists",
  "ErrorMessage" : "The connection does not exist.",
  "Success" : true
}

Error codes

For a list of error codes, visit the API Error Center.