全部產品
Search
文件中心

Elastic Compute Service:ModifyDiskDeployment

更新時間:Oct 09, 2026

將雲端硬碟遷入、遷出專屬區塊儲存叢集,或將雲端硬碟在不同專屬區塊儲存叢集之間遷移。

介面說明

說明

專屬區塊儲存叢集功能目前支援華東 1(杭州)、華東 2(上海)、華北 2(北京)、華北 3(張家口)、華北 6(烏蘭察布)、華南 1(深圳)、華南 2(河源)、印尼(雅加達)、德國(法蘭克福)以及華南 1 金融雲地域。

請確保在使用該介面前,您已充分了解雲端硬碟和專屬區塊儲存叢集的計費方式和價格,並且專屬區塊儲存叢集未到期,帳號未處於欠費狀態。更多資訊,請參見專屬區塊儲存計費和區塊儲存計費。

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

  • 雲端硬碟和專屬區塊儲存叢集必須在同一個可用區。

  • 僅支援按量付費雲端硬碟,包年包月雲端硬碟需要先轉成按量付費。具體操作,請參見轉換雲端硬碟計費方式。

  • 遷移時雲端硬碟規格需要和目標叢集支援的雲端硬碟規格保持一致,當在不同專屬區塊儲存叢集之間遷移時允許變更雲端硬碟規格,使其和目標叢集支援的雲端硬碟規格保持一致。

  • 雲端硬碟的狀態必須是使用中(In_use)狀態或者待掛載(Available)狀態。

  • 若雲端硬碟已掛載到 ECS 執行個體上,執行個體必須處於執行中(Running)狀態或者已停止(Stopped)狀態,ECS 執行個體不能處於已過期狀態。

  • 由於 ESSD 雲端硬碟效能層級受容量限制,如果您無法升級效能層級,可以擴容後重新操作。更多資訊,請參見 ResizeDisk 和 ESSD 雲端硬碟。

  • 一個帳號在同一地域內最多同時進行 5 個雲端硬碟遷移任務。

  • 遷移過程中不允許取消遷移、建立快照、變更規格、擴容、掛載、卸載、重新初始化雲端硬碟等操作。

說明

雲端硬碟遷移後遵循目標叢集對應的計費方式、雲端硬碟規格和能力,呼叫介面後立即生效,阿里雲按照新的雲端硬碟類型及雲端硬碟效能層級進行計費。更多資訊,請參見專屬區塊儲存計費和區塊儲存計費。

調試

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

調試

授權資訊

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

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

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

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

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

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

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

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

操作

存取層級

資源類型

條件關鍵字

關聯操作

ecs:ModifyDiskDeployment

update

*Disk

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

無 無

請求參數

名稱

類型

必填

描述

樣本值

DiskId

string

是

雲端硬碟 ID。

d-bp131n0q38u3a4zi****

DiskCategory

string

否

變更雲端硬碟類型,僅在不同專屬區塊儲存叢集之間遷移時有效。當前僅支援 cloud_essd(ESSD 雲端硬碟)。

預設值:空,表示不變更雲端硬碟規格。

cloud_essd

PerformanceLevel

string

否

修改 ESSD 雲端硬碟的效能層級,僅在不同專屬區塊儲存叢集之間遷移時有效。取值範圍:

  • PL0:單碟最高隨機讀寫 IOPS 1 萬。

  • PL1:單碟最高隨機讀寫 IOPS 5 萬。

預設值:空,表示不修改效能層級。

PL1

StorageClusterId

string

否

專屬區塊儲存叢集 ID。遷入專屬區塊儲存叢集前,需要已購買並建立專屬區塊儲存叢集,並確保雲端硬碟與目標叢集位於同一可用區。

  • 遷移至專屬區塊儲存叢集時,必須指定StorageClusterId。

  • 遷移至公有雲區塊儲存叢集時,StorageClusterId必須為空。

預設值:空,表示遷移至公有雲區塊儲存叢集。

dbsc-cn-c4d2uea****

DryRun

boolean

否

是否只預檢此次請求。取值範圍:

  • true:傳送檢查請求。檢查項目包括是否填寫了必需參數、請求格式、業務限制和 ECS 庫存。如果檢查不通過,則傳回對應錯誤。如果檢查通過,則傳回錯誤碼 DryRunOperation。

  • false:傳送正常請求,通過檢查後傳回 2XX HTTP 狀態碼並且直接遷移雲端硬碟。

預設值:false。

false

返回參數

名稱

類型

描述

樣本值

object

Schema of Response

RequestId

string

請求 ID。

D69846D9-F17F-51C0-8AC6-B4B71777****

TaskId

string

雲端硬碟遷移的任務 ID。

t-bp67acfmxazb4p****

樣本

正常返回樣本

JSON格式

{
  "RequestId": "D69846D9-F17F-51C0-8AC6-B4B71777****",
  "TaskId": "t-bp67acfmxazb4p****"
}

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

400 InvalidDiskSpec.Malformed The specified parameter DiskCategory or PerformanceLevel is not supported. 指定的參數 DiskCategory 或 PerformanceLevel 不支援。
400 AccountInArrears The account is in arrears. 帳號已欠費。
400 InvalidStorageClusterId.DiskAlreadyInDestination The specified disk is already in destination. 指定的磁碟已經在目的地中。
500 InternalError The request processing has failed due to some unknown error.
403 IncorrectDiskStatus The current disk status does not support this operation.
403 DiskCreatingSnapshot The operation is denied due to a snapshot of the specified disk is not completed yet.
403 InvalidOperation.DiskTypeUnsupported The type of the disk does not support this operation. 磁碟類型不支援該操作。
403 InvalidOperation.DiskCategoryUnsupported The current category of the disk does not support this operation.
403 InvalidOperation.ChargeTypeUnsupported The charge type of the disk does not support this operation. 磁碟的計費方式不支援該操作。
403 InvalidPerformanceLevel.DiskSizeUnsupported The specified parameter PerformanceLevel does not match the disk size. 指定的參數 PerformanceLevel 與磁碟大小不相符。
403 DiskLimitExceeded The number of migrated disks at the same time exceeds the limit. 同一時間遷移的磁碟數量超過限制。
403 OperationDenied.NoStock The requested resource is sold out in the specified zone; try other types of resources or other regions and zones. 指定的可用區或叢集中不存在指定磁碟類別,或指定的可用區與叢集不匹配。
403 InvalidOperation.MultiAttachDisk Multi attach disk does not support this operation. 開啟多重掛載特性的雲端硬碟不支援該操作。
403 InvalidDisk.DetachedSystemDisk The specified resource is/has a detached system disk %s , not support current operation. 指定的磁碟是一塊被卸載的系統磁碟,不支援目前操作。
403 InvalidOperation.NoPermission You are not authorized to do this action. 您沒有被授權進行目前操作,請提交工單進行回饋。
403 InvalidOperation.LimitQosUnsupported The specified disk has performance limits on bps or iops. This operation is not supported.
403 InvalidOperation.AcrossRegionsOrZonesUnsupported Migration across regions or available zones is not supported. 不支援跨地域或跨可用區的遷移。
403 InvalidOperation.AttachedShareDisk Attached share disk does not support this operation. 已掛載的共用磁碟不支援此操作。
403 InvalidDiskCategory.NotSupported The specified storage category is not supported. Please choose a category such as cloud_essd PL0 or PL1 and try again.
404 InvalidDiskId.NotFound The specified disk does not exist. 指定的磁碟不存在。請您檢查磁碟 ID 是否正確。
404 InvalidStorageClusterId.CategoryNotMatch The current dedicated storage cluster cannot create this category of disk.
404 InvalidStorageClusterId.NotFound The specified dedicated block storage cluster does not exist. 指定的專屬區塊儲存叢集不存在。

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

變更歷史

更多資訊,參考變更詳情。