阿里云如何使用刪除磁盤接口
來源:技術員聯(lián)盟┆發(fā)布時間:2017-12-08 12:26┆點擊:
當某個磁盤設備不再使用時,可以刪除磁盤。但是只能刪除獨立普通云盤。
刪除磁盤時磁盤的 status 必須為 Available。
如果指定 ID 的磁盤不存在,請求將被忽略。
由于用戶快照會被保留,自動快照可以選擇保留,請及時刪除不必要的孤立用戶快照和自動快照(即磁盤已經(jīng)被刪除的快照),以保持足夠的快照額度來順利完成周期性的自動快照策略。
請求參數(shù)
名稱
類型
是否必須
描述
Action
String
是
系統(tǒng)規(guī)定參數(shù),取值:DeleteDisk
DiskId
String
是
需要刪除的磁盤設備 ID
返回參數(shù)
全是公共返回參數(shù),詳見公共返回參數(shù)
錯誤碼
錯誤代碼
描述
Http 狀態(tài)碼
語義
MissingParameter
The input parameter "DiskId" that is mandatory for processing this request is not supplied.
400
DiskId 未指定
IncorrectDiskStatus
The current disk status does not support this operation.
403
磁盤狀態(tài)不正確
DiskNotPortable
The operation is denied due to the specified disk is not a portable disk.
403
磁盤不是可卸載的磁盤
DiskTypeViolation
The specified disk is a system disk and cannot support the operation.
403
指定的磁盤未系統(tǒng)盤不能卸載
DiskCreatingSnapshot
The operation is denied due to a snapshot of the specified disk is not completed yet.
403
指定的磁盤正在創(chuàng)建快照
示例
請求示例
https://ecs.aliyuncs.com/?Action=DeleteDisk
&DiskId=d-23jbf2v5m
&<公共請求參數(shù)>
返回示例
XML格式
CEF72CEB-54B6-4AE8-B225-F876FF7BA984
JSON格式
{
"RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BA984"