閱讀926 返回首頁    go 阿裏雲


刪除實例__實例相關接口_API 參考_雲服務器 ECS-阿裏雲

描述

根據傳入實例的名稱來釋放實例資源。釋放後實例所使用的物理資源都被回收,包括磁盤及快照,相關數據全部丟失且永久不可恢複。

  • 實例狀態必須為 Stopped,才可以進行刪除操作。刪除後,實例的狀態為 Deleted,表示資源已釋放,刪除完成。
  • 實例被刪除時,掛載在實例上的 DeleteWithInstance的屬性為 True 的磁盤會相應被刪除,這些磁盤的快照仍舊保留,自動快照根據磁盤的 DeleteAutoSnapshot 屬性,如果為 false 的,保留自動快照,如果為 true 的,則刪除自動快照。
  • 實例被刪除後,相關數據全部丟失且永久不可恢複。
  • 如果刪除實例時,實例被安全控製在實例的 OperationLocks 中標記了 "LockReason" : "security" 的鎖定狀態時,即使獨立普通雲盤的 DeleteWithInstnace 的屬性為 False,係統會忽略這個屬性而釋放掛載在實例上麵的普通雲盤。

請求參數

名稱 類型 是否必須 描述
Action String 係統規定參數,取值:DeleteInstance
InstanceId String 實例 ID

返回參數

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

錯誤碼

錯誤代碼 描述 Http 狀態碼 語義
MissingParameter The input parameter “InstanceId” that is mandatory for processing this request is not supplied. 400 缺少 InstanceId 值
IncorrectInstanceStatus The current status of the resource does not support this operation. 403 該資源目前的狀態不支持此操作
ChargeTypeViolation The operation is not permitted due to charge type of the instance. 403 不能刪除預付費的實例
InternalError The request processing has failed due to some unknown error. 500 內部錯誤
DependencyViolation.SLBConfiguring Specified operation is denied as the instance is being used by another product. 400 實例被 SLB 引用,且 SLB 正在配置

示例

請求示例

  1. https://ecs.aliyuncs.com/?Action=DeleteInstance
  2. &InstanceId=i-instance1
  3. &<公共請求參數>

返回示例

XML格式

  1. <DeleteInstanceResponse>
  2. <RequestId>928E2273-5715-46B9-A730-238DC996A533</RequestId>
  3. </DeleteInstanceResponse>

JSON格式

  1. {
  2. "RequestId": "928E2273-5715-46B9-A730-238DC996A533"
  3. }

最後更新:2016-11-28 10:29:08

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