StopInstance
Description
call StopInstance stops a running (Running) ECS instance. After successfully calling the interface, the instance changes from a stopped (Stopping) to a stopped (Stopped) state.
Request Method
POST
Request Path
/apsara/route/Ecs/StopInstance
Request Parameters Common Parameters
Name | Location | Type | Required | Sample value | Description |
---|---|---|---|---|---|
InstanceId | BODY | string | Yes | i-bp67acfmxazb4ph*** | the specified instance ID. |
regionId | BODY | string | Yes | No sample value for this parameter. | region id |
ForceStop | BODY | boolean | No | false | whether to force shutdown policy when stopping the instance. Value range: true: forced shutdown. false (default): normal shutdown process. |
DryRun | BODY | boolean | No | true | whether to precheck only this request. Value range: true: send a check request without stopping the instance. Check items include required parameters, request format, business restrictions, and ECS inventory. If the check fails, the corresponding error is returned. If the check passes, the error code DryRunOperation is returned. false (default): sends a normal request and stops the instance directly after checking. |
version | BODY | string | No | 2016-01-01 | version of api |
Return data
Name | Type | Sample value | Description |
---|---|---|---|
RequestID | string | 1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC | Request id |
Example
Successful Response example
{
"RequestID":"1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC"
}
Failed Response example
{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}
}