閱讀876 返回首頁    go 美食


將實例移出安全組__實例相關接口_API 參考_雲服務器 ECS-阿裏雲

描述

將實例移出指定的安全組。

  • 隻有在實例狀態為 Stopped 或 Running 狀態下才可以執行該操作。
  • 每個實例最少屬於 1 個安全組,如果實例僅屬於一個安全組,嚐試移出時,請求會失敗。

請求參數

名稱 類型 是否必須 描述
Action String 係統規定參數,取值:LeaveSecurityGroup
InstanceId String 指定的實例 ID
SecurityGroupId String 安全組代碼

返回參數

全是公共返回參數,詳見公共返回參數

錯誤碼

錯誤代碼 描述 Http 狀態碼 語義
InvalidInstanceId.NotFound The InstanceId provided does not exist in our records. 404 指定的 InstanceId 不存在
MissingParameter The input parameter "InstanceId" that is mandatory for processing this request is not supplied. 400 缺少 InstanceId 值
InvalidSecurityGroupId.NotFound The SecurityGroupId provided does not exist in our records. 404 指定的 SecurityGroupId 不存在
MissingParameter The input parameter "SecurityGroupId" that is mandatory for processing this request is not supplied. 400 缺少 SecurityGroupId 值
InstanceLastSecurityGroup The SecurityGroup is the only one for the Instance. 403 該安全組是該實例唯一的安全組
IncorrectInstanceStatus The current status of the resource does not support this operation. 403 該資源目前的狀態不支持此操作
InstanceLockedForSecurity The specified operation is denied as your instance is locked for security reasons. 403 該資源目前被安全鎖定被拒絕操作

示例

請求示例

https://ecs.aliyuncs.com/?Action=LeaveSecurityGroup
&InstanceId=i-instance1
&SecurityGroupId=F876FF7BA984
&<公共請求參數>

返回示例

XML格式

<LeaveSecurityGroupResponse>
    <RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E</RequestId>
</LeaveSecurityGroupResponse>

JSON格式

{
    "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}

最後更新:2016-11-23 16:03:50

  上一篇:go 將實例加入安全組__實例相關接口_API 參考_雲服務器 ECS-阿裏雲
  下一篇:go 查詢實例管理終端地址__實例相關接口_API 參考_雲服務器 ECS-阿裏雲