将云盘迁入、迁出专属块存储集群,或将云盘在不同专属块存储集群之间迁移。
接口说明
专属块存储集群功能目前支持华东 1(杭州)、华东 2(上海)、华北 2(北京)、华北 3(张家口)、华北 6(乌兰察布)、华南 1(深圳)、华南 2(河源)、印度尼西亚(雅加达)、德国(法兰克福)以及华南 1 金融云地域。
请确保在使用该接口前,您已充分了解云盘和专属块存储集群的计费方式和价格,并且专属块存储集群未到期,账号未处于欠费状态。更多信息,请参见专属块存储计费和块存储计费。
调用该接口时,您需要注意:
云盘和专属块存储集群必须在同一个可用区。
仅支持按量付费云盘,包年包月云盘需要先转成按量付费。具体操作,请参见转换云盘计费方式。
迁移时云盘规格需要和目标集群支持的云盘规格保持一致,当在不同专属块存储集群之间迁移时允许变更云盘规格,使其和目标集群支持的云盘规格保持一致。
云盘的状态必须是使用中(In_use)状态或者待挂载(Available)状态。
若云盘已挂载到 ECS 实例上,实例必须处于运行中(Running)状态或者已停止(Stopped)状态,ECS 实例不能处于已过期状态。
由于 ESSD 云盘性能级别受容量限制,如果您无法升级性能级别,可以扩容后重新操作。更多信息,请参见 ResizeDisk 和 ESSD 云盘。
一个账号在同一地域内最多同时进行 5 个云盘迁移任务。
迁移过程中不允许取消迁移、创建快照、变配、扩容、挂载、卸载、重新初始化云盘等操作。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
ecs:ModifyDiskDeployment |
update |
*Disk
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| DiskId |
string |
是 |
云盘 ID。 |
d-bp131n0q38u3a4zi**** |
| DiskCategory |
string |
否 |
变更云盘类型,仅在不同专属块存储集群之间迁移时有效。当前仅支持 cloud_essd(ESSD 云盘)。 默认值:空,表示不变配云盘。 |
cloud_essd |
| PerformanceLevel |
string |
否 |
修改 ESSD 云盘的性能级别,仅在不同专属块存储集群之间迁移时有效。取值范围:
默认值:空,表示不修改性能级别。 |
PL1 |
| StorageClusterId |
string |
否 |
专属块存储集群 ID。
默认值:空,表示迁移至公共云块存储集群。 |
dbsc-cn-c4d2uea**** |
| DryRun |
boolean |
否 |
是否只预检此次请求。取值范围:
默认值: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 limited bps or iops, can not do this operation. | 指定的磁盘处于性能控制状态,不能进行该操作。 |
| 403 | InvalidOperation.AcrossRegionsOrZonesUnsupported | Migration across regions or available zones is not supported. | 不支持跨地域或跨可用区的迁移。 |
| 403 | InvalidOperation.AttachedShareDisk | Attached share disk does not support this operation. | 已挂载的共享盘不支持该操作。 |
| 404 | InvalidDiskId.NotFound | The specified disk does not exist. | 指定的磁盘不存在。请您检查磁盘 ID 是否正确。 |
| 404 | InvalidStorageClusterId.NotFound | The specified dedicated block storage cluster does not exist. | 指定的专属块存储集群不存在。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。