全部產品
Search
文件中心

Elastic Compute Service:DeleteDisk

更新時間:Jun 18, 2026

釋放一塊按量付費資料磁碟。磁碟類型包括普通雲端硬碟、高效雲端硬碟、SSD 雲端硬碟和 ESSD 雲端硬碟。

介面說明

呼叫該介面時,您需要注意:

  • 您的磁碟手動快照會被保留。

  • 您可以透過 ModifyDiskAttribute 設定是否保留或者同時釋放自動快照。建議您及時刪除不必要的快照,以保持足夠的快照額度完成週期性的自動快照策略。

  • 釋放磁碟時,雲端硬碟的狀態必須為待掛載(Available)。

  • 如果指定 ID 的磁碟不存在,請求將被忽略。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

ecs:DeleteDisk

delete

*Disk

acs:ecs:{#regionId}:{#accountId}:disk/{#diskId}

請求參數

名稱

類型

必填

描述

樣本值

DiskId

string

需要釋放的雲端硬碟裝置 ID。

d-bp14k9cxvr5uzy5****

返回參數

名稱

類型

描述

樣本值

object

RequestId

string

請求 ID。

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

樣本

正常返回樣本

JSON格式

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

異常返回樣本

JSON格式

{
    "RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BA984"
}

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

400 InvalidRegionId.MalFormed The specified parameter RegionId is not valid.
500 InternalError The request processing has failed due to some unknown error.
403 IncorrectDiskStatus The current disk status does not support this operation.
403 DiskNotPortable The specified disk is not a portable disk.
403 DiskTypeViolation The specified disk is a system disk and cannot support the operation.
403 DiskCreatingSnapshot The operation is denied due to a snapshot of the specified disk is not completed yet.
403 IncorrectDiskStatus.Initializing The current disk status does not support this operation.
403 DiskStillAttached The disk is still attached to the disk.
403 UserNotInTheWhiteList The user is not in disk white list.
403 InvalidDiskStatus.DeleteProtection The specified disk is under delete protection, can not be deleted.
404 InvalidDiskId.NotFound The specified disk does not exist.

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情