变更一块云盘类型,或者修改一块ESSD云盘的性能级别。ESSD同城冗余云盘、普通云盘、弹性临时盘和本地盘均不支持变更云盘类型。
接口说明
请确保在使用该接口前,您已充分了解云盘的计费方式和价格。
为了减少变配操作对您业务带来的影响,请您在业务低峰期进行变配。
调用该接口时,您需要注意:
-
修改 ESSD 云盘性能级别:
-
包年包月 ESSD 云盘仅支持升级性能级别。
-
按量付费 ESSD 云盘支持升级和降低性能级别,但不支持降配到 PL0。
-
ESSD 云盘的状态必须是使用中(In_Use)状态或者待挂载(Available)状态。
-
若 ESSD 云盘已挂载到 ECS 实例上,实例必须处于运行中(Running)状态或者已停止(Stopped)状态,不能处于过期或者账号欠费状态。
-
由于 ESSD 云盘性能级别受容量限制,如果您无法升级性能级别,可以扩容( ResizeDisk )后重新操作。更多信息,请参见 ESSD 云盘。
-
-
变更一块云盘类型的注意事项,请参见变更云盘类型。
-
不同类型的云盘支持变配的情况,请参见云盘支持变配情况。
- 开启多重挂载特性的云盘不支持云盘变配。
云盘变配后,计费变化情况如下:
-
按量付费云盘:按照新的云盘类型计费。
-
包年包月云盘:在计费周期内,会根据新旧配置的价格差和剩余天数(从次日 0 点到有效期结束)来计算应补缴的费用。
关于云盘的计费信息,请参见块存储计费。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
下表是API对应的授权信息,可以在RAM权限策略语句的Action
元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:
- 操作:是指具体的权限点。
- 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
- 资源类型:是指操作中支持授权的资源类型。具体说明如下:
- 对于必选的资源类型,用前面加 * 表示。
- 对于不支持资源级授权的操作,用
全部资源
表示。
- 条件关键字:是指云产品自身定义的条件关键字。
- 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 |
---|
操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 |
---|---|---|---|---|
ecs:ModifyDiskSpec | update | *Disk acs:ecs:{#regionId}:{#accountId}:disk/{#diskId} |
| 无 |
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
DiskId | string | 是 | 云盘的 ID。 | d-bp131n0q38u3a4zi**** |
PerformanceLevel | string | 否 | 修改一块 ESSD 云盘的性能级别。取值范围:
默认值:PL1。 | PL2 |
DiskCategory | string | 否 | 变更一块云盘的类型。取值范围:
默认值:空,表示不变配云盘。
| cloud_essd |
DryRun | boolean | 否 | 是否只预检此次请求。取值范围:
默认值:false。 | false |
ProvisionedIops | long | 否 | 是否修改 ESSD AutoPL 云盘预配置读写 IOPS。 取值范围:0~min{50000, 1000*容量-基准性能}。 基准性能=min{1,800+50*容量, 50,000}。
当 DiskCategory 取值为cloud_auto 时才支持设置该参数。更多信息,请参见ESSD AutoPL 云盘和修改 ESSD AutoPL 云盘预配置信息。
| 50000 |
PerformanceControlOptions | object | 否 | 磁盘性能控制参数集合。 | |
IOPS | integer | 否 | 2000 | |
Throughput | integer | 否 | 200 | |
Recover | string | 否 | 重置云盘性能,仅支持专属存储集群云盘。 设置该参数后,PerformanceControlOptions.IOPS 和 PerformanceControlOptions.Throughput 参数不生效。 目前仅支持设置为 All(重置云盘 IOPS 和吞吐量到初始值)。 | All |
DestinationZoneId | string | 否 |
该参数正在邀测中,暂不支持使用。
| cn-hangzhou-g |
返回参数
示例
正常返回示例
JSON
格式
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"TaskId": "t-bp67acfmxazb4p****",
"OrderId": "20413515388****"
}
错误码
HTTP status code | 错误码 | 错误信息 | 描述 |
---|
HTTP status code | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | InvalidPerformanceLevel.Malformed | The specified parameter PerformanceLevel is not valid. | 指定的参数 PerformanceLevel 无效。 |
400 | InvalidDiskCategory.ValueNotSupported | The specified parameter "DiskCategory" is not valid. | 指定的参数云盘类型DiskCategory无效。 |
400 | InvalidPerformanceLevelParam.Mismatch | The specified parameter PerformanceLevel should be null when DiskCategory is not cloud_essd. | - |
400 | OperationDenied.DiskInDedicatedBlockStorageCluster | The disk in dedicated block storage cluster is not allowed to do this operation. | - |
400 | IncorrectDiskStatus.ReplicationStatusNotFound | Disk replication status not found. | - |
400 | IncorrectDiskStatus.InReplication | Disk already in replication. | - |
400 | ProvisionedIopsForDiskCategoryUnsupported | The specified disk category does not support provisioned iops. | 指定的磁盘类型不支持预配置IOPS。 |
400 | InvalidProvisionedIops.LimitExceed | The provisioned iops exceeds the limit. | 填写的ProvisionedIops参数超限。 |
400 | QuotaExceed.DiskCapacity | The used capacity of disk type has exceeded the quota in the zone, %s. | 指定磁盘类型的已用容量超出可用区配额限制,您可以前往配额中心查询和申请提升磁盘容量配额。 |
400 | MalformedParameter.PerformanceControlOptions | Parameter invalid, %s. | 参数不合法 |
400 | InvalidPerformanceControlOptions.ModifyOperationUnsupported | The specified performance control options are conflicts with disk category or performance level or ProvisionIOPS. | 磁盘性能控制参数与磁盘类型、磁盘性能等级、预配置IOPS参数冲突。 |
400 | NoPermission.Price | The operation requires price permission. Please either apply for permission from your main account, or set the parameter AutoPay as true. | - |
400 | NoPermission.Refund | The operation requires refund permission. Please apply for permission from your main account. | 该账号无权限操作退款,主账号需要授权退款相关权限。 |
400 | InvalidOperation.InstanceRenewWithDowngradeInPlan | The operation is denied due to the specified instance has renew with downgrade record in plan. | 存在未生效的续费降配订单。订单生效前不允许此操作。 |
400 | InvalidOperation.InstanceStatusUnsupported | The specified instance status is not supported for this operation, expect status is Running or Stopped. | 指定的实例的状态不满足,实例的状态须为 Running 或 Stopped。 |
403 | DiskInArrears | The specified operation is denied as your disk owing fee. | 指定的磁盘已欠费。 |
403 | InstanceExpiredOrInArrears | The specified operation is denied as your prepay instance is expired (prepay mode) or in arrears (afterpay mode). | 实例已过期或者欠费,请您续费或者结清后再进行操作。 |
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 | OperationDenied | The type of the disk does not support the operation. | 此磁盘种类不支持指定的操作。 |
403 | InvalidPerformanceLevel.TooLow | Specified new performance level is lower than the original performance level. | - |
403 | OperationDenied.PerformanceLevelNotMatch | The specified PerformanceLevel and disk size do not match. | 指定的性能等级与磁盘大小不匹配。 |
403 | UserNotInTheWhiteList | The user is not in modify disk category white list. | - |
403 | InvalidRegion.NotSupport | The specified region does not support modify disk category. | - |
403 | InvalidDiskCategory.ValueNotSupported | The current disk category of the resource does not support this operation. | 指定的资源上的磁盘类型不支持此操作。 |
403 | Downgrade.NotSupported | Downgrade operation for prepay resource is not supported. | - |
403 | InvalidInstanceType.NotSupportDiskCategory | The instanceType of the specified instance does not support this disk category. | 指定的实例规格(InstanceType)不支持当前实例的云盘类别。请尝试更换其它实例规格。关于实例规格支持的云盘类型,请参见实例规格族文档。 |
403 | ModifyingDiskCategoryLimitExceed | The amount of modifying disk category exceeds the limit. | 当前地域正在变配的磁盘个数超过上限 |
403 | DiskInCoolingPeriod | There is a cooling period after the disk is successfully modified. | 云盘处于变配周期限制中,不可再次发起变配 |
403 | DiskHasFlashSnapshot | The specified disk with flash snapshots do not support modify disk category. | - |
403 | NoChangeInDiskCategoryAndPerformanceLevel | There is no change between the parameters transmitted and the current. | 您所传的磁盘种类和性能等级与当前磁盘一致 |
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 | OperationDenied.DiskExpansionUnfinished | The instance has not been restarted after a previous disk expansion. | - |
403 | InvalidDiskCategory.NotSupported | The specified disk category is not supported. | 指定的云盘类型不支持当前操作。 |
403 | InvalidPerformanceParameter.DiskNotInDedicatedStorageCluster | The specified disk not in dedicated storage cluster, can not modify performance control options. | 非专属存储集群磁盘不支持修改磁盘性能控制参数。 |
403 | InvalidStatus.DiskUnderPerformanceControl | The specified disk is under performance control, any modifications to the category or performance level of the specified disk are unsupported.. | 磁盘处于性能控制状态,无法进行磁盘类型、性能等级变更。 |
403 | InvalidStatus.DiskNotReady | This specified disk is not ready, status needs to be either In_use or Available. | 指定磁盘的状态必须是In_use或Available。 |
403 | InvalidOperation.DiskInReplicaPairsUnsupported | The disk in replication pairs does not support this operation. | 异步复制对中的磁盘不支持当前操作。 |
403 | InvalidDisk.DetachedSystemDisk | The specified resource is/has a detached system disk %s , not support current operation. | 指定的磁盘是一块被卸载的系统盘,不支持当前操作。 |
403 | InvalidDiskCategory.InstanceTypeUnsupported | The current instance type does not support the specified disk category. Please check the list of disk category supported by the instance type and select an appropriate disk category for configuration. | 当前实例类型不支持指定的磁盘类别。请检查该实例类型支持的磁盘类型列表,并选择合适的磁盘类别进行配置。 |
404 | InvalidDiskId.NotFound | The specified disk does not exist. | 指定的磁盘不存在。请您检查磁盘 ID 是否正确。 |
404 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. | 指定的实例ID无效。 |
404 | InternalError | The request processing has failed due to some unknown error, exception or failure. | 内部错误,请重试。 |
404 | InvalidDiskCategory.ValueUnauthorized | The specified DiskCategory is not authorized. | 该磁盘种类未经授权。 |
访问错误中心查看更多错误码。
变更历史
变更时间 | 变更内容概要 | 操作 |
---|
变更时间 | 变更内容概要 | 操作 |
---|---|---|
2025-04-21 | OpenAPI 错误码发生变更 | 查看变更详情 |
2025-04-08 | OpenAPI 错误码发生变更 | 查看变更详情 |
2025-03-11 | OpenAPI 错误码发生变更 | 查看变更详情 |
2025-01-17 | OpenAPI 错误码发生变更 | 查看变更详情 |
2025-01-06 | OpenAPI 错误码发生变更、OpenAPI 入参发生变更 | 查看变更详情 |
2024-12-17 | OpenAPI 描述信息更新、OpenAPI 错误码发生变更 | 查看变更详情 |
2024-08-23 | OpenAPI 错误码发生变更 | 查看变更详情 |
2024-07-31 | OpenAPI 错误码发生变更 | 查看变更详情 |
2024-01-29 | OpenAPI 错误码发生变更 | 查看变更详情 |
2023-10-18 | OpenAPI 错误码发生变更 | 查看变更详情 |
2023-05-16 | OpenAPI 错误码发生变更 | 查看变更详情 |
2023-04-17 | OpenAPI 错误码发生变更、OpenAPI 入参发生变更 | 查看变更详情 |