ResizeDisk_云服务器 ECS_API文档

插件下载了解更多
VS Code 插件
安装插件之前,确保已安装 VS Code安装插件之前,确保已安装 VS Code
Alibaba Cloud Developer Toolkit is a collection of extensions that can help access Alibaba Cloud services in Visual Studio Code.
JetBrains 插件
安装插件之前,确保已安装 JetBrains IDE安装插件之前,确保已安装 JetBrains IDE
The Alibaba Cloud Developer Toolkit for JetBrains makes it easier to access Alibaba Cloud services.

接口说明

说明 扩容前,请务必查询云盘采用的分区格式。如果是 MBR 格式,不支持扩容到 2TiB 以上,否则会造成数据丢失。对于 MBR 分区扩容,建议您重新创建并挂载一块数据盘,采用 GPT 分区格式后,再将已有数据拷贝至新的数据盘上。更多详情,请参见扩容云盘容量
  • 支持扩容的磁盘类型包括普通云盘(cloud)、高效云盘(cloud_efficiency)、SSD 云盘(cloud_ssd)、ESSD 云盘(cloud_essd、ESSD Entry 云盘(cloud_essd_entry)、ESSD AutoPL 云盘(cloud_auto)、弹性临时盘-标准版(elastic_ephemeral_disk_standard)和弹性临时盘-高级版(elastic_ephemeral_disk_premium)。

  • 正在创建快照的云盘不支持扩容。请您等待快照创建完成后,再开始执行扩容操作。

  • 该接口不能扩容分区和文件系统,您需要在扩容云盘容量后自行分配分区和文件系统,具体操作,请参见扩容分区和文件系统

  • 开启多重挂载特性的云盘支持在线扩容和离线扩容,请确保磁盘挂载的实例满足以下条件:

    • 在线扩容时,实例状态为运行中Running)。
    • 离线扩容时,实例状态为运行中Running)或已停止Stopped)。
  • 请确保云盘满足以下条件:

    • 云盘状态为使用中(In Use)或者待挂载(Available)。
    • (强烈建议)已为云盘创建快照,做好数据备份。具体操作,请参见创建快照
    • 如果您是全新购买的数据盘,请先完成初始化再执行扩容操作。更多信息,请参见初始化概述

流控信息

请求速率为1000/60(s)。

授权信息

如下是此API对应的授权信息,用于RAM权限策略语句的Action元素中,为RAM用户或RAM角色授予调用此API的权限。请通过 RAM 访问控制设置,使用方法可参考访问控制帮助文档

具体说明如下:展开详情

操作访问级别资源类型条件关键字关联操作
ecs:ResizeDisk
Update
Disk
acs:ecs:{#regionId}:{#accountId}:disk/{#diskId}

请求参数

字段名称字段详情
DiskIdstring

磁盘 ID。您可以调用 DescribeDisks 查询磁盘 ID。

示例值:d-bp67acfmxazb4p****参考取值来源:
    CreateDisk
    DescribeDisks
Typestring

扩容磁盘的方式。取值范围:展开详情

示例值:offline
NewSizeinteger<int32>

希望扩容到的磁盘容量大小。单位为 GiB。取值范围:展开详情

示例值:1900取值 <= 65536
ClientTokenstring

保证请求幂等性。从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken 只支持 ASCII 字符,且不能超过 64 个字符。更多信息,请参见如何保证幂等性

示例值:123e4567-e89b-12d3-a456-426655440000

返回参数

字段名称字段详情
OrderIdstring

生成的订单 ID。展开详情

示例值:20413515388****
RequestIdstring

请求 ID。

示例值:F3CD6886-D8D0-4FEE-B93E-1B732396****

返回示例

错误码

全局错误码
HTTP 状态码错误码错误信息操作
400
InvalidDataDiskSize.ValueNotSupported
The specified DataDisk.n.Size beyond the permitted range, or the capacity of snapshot exceeds the size limit of the specified disk category.诊断
400
InvalidParameter.Conflict
%s诊断
400
IncompleteParamter
Some fields can not be null in this request.诊断
400
InvalidRegionId.MalFormed
The specified RegionId is not valid.诊断
400
InvalidParam.Type
The specified type is not supported.诊断
400
LastOrderProcessing
The previous order is still processing, please try again later.诊断
400
InvalidStatus.Upgrading
The instance which the disk attachs is upgrading; please try again later.诊断
400
InvalidSystemDiskSize.ImageNotSupportResize
The image of the instance does not support resize.诊断
400
InvalidDisk.DetachedSystemDisk
The specified disk is a detached system disk, does not support this operation.诊断
400
OperationDenied.NotEnoughCapacity
The capacity of the current dedicated block storage cluster is not enough to expand.诊断
400
IncorrectDiskStatus.ReplicationStatusNotFound
Disk replication status not found.诊断
400
IncorrectDiskStatus.InReplication
Disk already in replication.诊断
400
QuotaExceed.DiskCapacity
The used capacity of disk type has exceeded the quota in the zone, %s.诊断
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
InvalidSystemDiskSize.ValueNotSupported
The specified system disk size is invalid.诊断
403
InvalidDataDiskSize.ValueNotSupported
The specified DataDisk.n.Size beyond the permitted range, or the capacity of snapshot exceeds the size limit of the specified disk category.诊断
403
OperationDenied
The type of the disk does not support the operation.诊断
403
InvalidDiskSize.TooSmall
Specified new disk size is less than the original disk size.诊断
403
InvalidDiskSize.TooLarge
Specified new disk size is beyond the permitted range.诊断
403
InstanceExpiredOrInArrears
The specified operation is denied as your prepay instance is expired (prepay mode) or in arrears (afterpay mode).诊断
403
DiskError
Incorrect disk status.诊断
403
DiskInArrears
The specified operation is denied as your disk owing fee.诊断
403
IncorrectInstanceStatus
The current status of the resource does not support this operation.诊断
403
DiskCreatingSnapshot
The operation is denied due to a snapshot of the specified disk is not completed yet.诊断
403
InvalidDiskSize
Specified new disk size is less than or equal the original disk size.诊断
403
Operation.Conflict
The operation may conflicts with others.诊断
403
InstanceLockedForSecurity
The instance is locked due to security.诊断
403
IncorrectDiskStatus
The current disk status does not support this operation.诊断
403
UserNotInTheWhiteList
The user is not in disk white list.诊断
403
InvalidDiskCategory.NotSupported
The specified disk category is not supported.诊断
403
InvalidRegion.NotSupport
The specified region does not support resize online.诊断
403
InvalidInstanceStatus.NotRunning
The status of instance to which the disk attachs must be running when resizing online.诊断
403
InvalidOperation.InstanceTypeNotSupportOnlineResize
The instance type of the specified instance does not support resize online.诊断
403
InvalidParameter.KMSKeyId.CMKUnauthorized
The CMK needs to be added ECS tag.诊断
403
InvalidParameter.KMSKeyId.CMKNotEnabled
The CMK needs to be enabled.诊断
403
InvalidParameter.KMSKeyId.KMSUnauthorized
ECS service have no right to access your KMS.诊断
403
InstanceSpecModification.NotEffective
The instance which the disk attachs has been reserved for making a spec modification and not taken effective in the current contract period.诊断
403
InvalidDiskSize.NotSupportResizeOnline
The current size of the resource does not support resize online.诊断
403
SecurityRisk.3DVerification
We have detected a security risk with your default credit or debit card. Please proceed with verification via the link in your email.诊断
403
QuotaExceeded.PostpaidDataDiskCapacity
The quota of postpaid data disk capacity exceeds.诊断
403
InvalidOperation.MultiAttachDiskNotSupportResizeOnline
Multi attach disk does not support resize online.诊断
403
InvalidDataDiskCategory.ValueNotSupported
The specified Category of Data Disk is not valid.诊断
404
InvalidDiskId.NotFound
The specified disk does not exist.诊断
404
InvalidInstanceId.NotFound
The specified InstanceId does not exist.诊断
500
InternalError
The request processing has failed due to some unknown error.诊断

变更历史

变更时间变更内容概要操作
2024-12-30
变更错误码400
变更错误码403
2024-08-23
删除返回参数
2023-10-18
变更错误码400
2023-10-09
变更请求参数NewSize
2023-05-16
变更错误码400
  • 1
  • 2
  • 10 条/页

相关示例

ECS扩容磁盘
2021-01-14
磁盘相关(扩容)
2022-03-21