Skip to main content

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

NameLocationTypeRequiredSample valueDescription
InstanceIdBODYstringYesi-bp67acfmxazb4ph***the specified instance ID.
regionIdBODYstringYesNo sample value for this parameter.region id
ForceStopBODYbooleanNofalsewhether to force shutdown policy when stopping the instance. Value range: true: forced shutdown. false (default): normal shutdown process.
DryRunBODYbooleanNotruewhether 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.
versionBODYstringNo2016-01-01version of api

Return data

NameTypeSample valueDescription
RequestIDstring1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DCRequest id

Example

Successful Response example

{
"RequestID":"1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC"
}

Failed Response example

{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}

}