接口说明
设置/取消实例退订保护(含系统盘),不含关联的数据盘和公网IP/带宽(支持批量)。
注意事项:
- 专属宿主机上云主机不支持。
URL
POST https://ecloud.10086.cn/api/openapi-instance/v4/modify-deletion-protection
请求参数
Body
|
参数名称
|
类型
|
必填
|
描述
|
|
batchModifyDeletionProtectionReq
|
BatchModifyDeletionProtectionReq
|
是
|
batchModifyDeletionProtectionReq |
|
instanceDeletionProtections
|
<ModifyDeletionProtectionReq> array
|
是
|
实例批量设置/取消退订保护请求体。 |
|
instanceId
|
string
|
是
|
实例ID,可通过查询实例状态列表接口获取。 |
|
deletionProtection
|
boolean
|
是
|
实例是否开启实例退订保护。取值范围:
|
请求示例
POST https://ecloud.10086.cn/api/openapi-instance/v4/modify-deletion-protection
{
"instanceDeletionProtections":[
{
"deletionProtection":false,
"instanceId":"42se3721-hf4c-4d14-wek4-1ed8775155f4"
},
{
"deletionProtection":true,
"instanceId":"42se3721-hf4c-4d14-wek4-1ed87751551a"
}
]
}
返回参数
返回码: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-36143fda7eb24f3eb55adadb2f49515a-7",
"state":"OK",
"body":{
"instanceBatchResult":[
{
"instanceId":"42se3721-hf4c-4d14-wek4-1ed8775155f4",
"result":true,
"message":""
},
{
"instanceId":"42se3721-hf4c-4d14-wek4-1ed87751551a",
"result":true,
"message":""
}
]
}
}