技術(shù)員聯(lián)盟提供win764位系統(tǒng)下載,win10,win7,xp,裝機(jī)純凈版,64位旗艦版,綠色軟件,免費(fèi)軟件下載基地!

當(dāng)前位置:主頁 > 教程 > 服務(wù)器類 >

阿里云如何使用刪除實(shí)例接口

來源:技術(shù)員聯(lián)盟┆發(fā)布時(shí)間:2017-12-10 06:32┆點(diǎn)擊:

  根據(jù)傳入實(shí)例的名稱來釋放實(shí)例資源。釋放后實(shí)例所使用的物理資源都被回收,包括磁盤及快照,相關(guān)數(shù)據(jù)全部丟失且永久不可恢復(fù)。

  實(shí)例狀態(tài)必須為 Stopped,才可以進(jìn)行刪除操作。刪除后,實(shí)例的狀態(tài)為 Deleted,表示資源已釋放,刪除完成。

  實(shí)例被刪除時(shí),掛載在實(shí)例上的 DeleteWithInstance的屬性為 True 的磁盤會相應(yīng)被刪除,這些磁盤的快照任舊保留,自動(dòng)快照根據(jù)磁盤的 DeleteAutoSnapshot 屬性,如果為 false 的,保留自動(dòng)快照,如果為 true 的,則刪除自動(dòng)快照。

  實(shí)例被刪除后,相關(guān)數(shù)據(jù)全部丟失且永久不可恢復(fù)。

  如果刪除實(shí)例時(shí),實(shí)例被安全控制在實(shí)例的 OperationLocks 中標(biāo)記了 "LockReason" : "security" 的鎖定狀態(tài)時(shí),即使獨(dú)立普通云盤的 DeleteWithInstnace 的屬性為 False,系統(tǒng)會忽略這個(gè)屬性而釋放掛載在實(shí)例上面的普通云盤。

  請求參數(shù)

名稱 類型 是否必須 描述
Action   String     系統(tǒng)規(guī)定參數(shù),取值:DeleteInstance  
InstanceId   String     實(shí)例 ID  

  返回參數(shù)

  全是公共返回參數(shù),詳見公共返回參數(shù)

  錯(cuò)誤碼

錯(cuò)誤代碼 描述 Http 狀態(tài)碼 語義
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   該資源目前的狀態(tài)不支持此操作  
ChargeTypeViolation   The operation is not permitted due to charge type of the instance.   403   不能刪除預(yù)付費(fèi)的實(shí)例  
InternalError   The request processing has failed due to some unknown error.   500   內(nèi)部錯(cuò)誤  
DependencyViolation.SLBConfiguring   Specified operation is denied as the instance is being used by another product.   400   實(shí)例被 SLB 引用,且 SLB 正在配置  

  示例

  請求示例

  https://ecs.aliyuncs.com/?Action=DeleteInstance

  &InstanceId=i-instance1

  &<公共請求參數(shù)>

  返回示例

  XML格式

  

  928E2273-5715-46B9-A730-238DC996A533

  

  JSON格式

  {

  "RequestId": "928E2273-5715-46B9-A730-238DC996A533"