接口说明
操作实例关机(支持批量),支持同时操作不同可用区的实例。
注意事项:
-
一次最多关机50台实例(RAM用户一次最多10台)。
-
实例在
active(运行中)状态才能做此操作。
URL
POST https://ecloud.10086.cn/api/openapi-instance/v4/batch-stop-instances
请求参数
Body
|
参数名称
|
类型
|
必填
|
描述
|
|
batchActionReq
|
BatchActionReq
|
是
|
batchActionReq |
|
instanceIds
|
<string> array
|
是
|
实例ID数组。可通过查询实例状态列表接口获取。 |
请求示例
POST https://ecloud.10086.cn/api/openapi-instance/v4/batch-stop-instances
{
"instanceIds":[
"5e35ed93-c35a-463e-8a6e-840fd8dbe439",
"aafcf0cd-aced-47bb-b71d-07bd0322dfc6"
]
}
返回参数
返回码:200
OK
|
参数名称
|
类型
|
描述
|
|
body
|
BatchAction«InstanceActionResult»
|
请求成功时返回的数据。 |
|
instanceBatchResult
|
<InstanceActionResult> array
|
实例批量操作结果集。 |
|
instanceId
|
string
|
实例ID。 |
|
result
|
boolean
|
操作是否下发成功。 |
|
message
|
string
|
操作结果信息,失败时返回错误信息,成功时返回空字符串。 |
|
errorCode
|
string
|
统一错误码。 |
|
errorMessage
|
string
|
页面国际化错误提示。 |
|
errorParams
|
<string> array
|
统一错误码的自定义参数。 |
|
requestId
|
string
|
每个请求的序列号。 |
|
state
|
enum(OK,ERROR,EXCEPTION,ALARM,FORBIDDEN)
|
返回状态码。返回正常:OK,返回错误:ERROR,返回异常:EXCEPTION,需要告警实现的:ALARM,禁止访问:FORBIDDEN。 |
返回示例
返回码:200
OK
{
"requestId":"reqId-0d77ff54c9f341e9b08ab7df43813f97-8",
"state":"OK",
"body":{
"instanceBatchResult":[
{
"instanceId":"5e35ed93-c35a-463e-8a6e-840fd8dbe439*",
"result":true,
"message":""
},
{
"instanceId":"aafcf0cd-aced-47bb-b71d-07bd0322dfc6",
"result":true,
"message":""
}
]
}
}