技术员联盟提供win764位系统下载,win10,win7,xp,装机纯净版,64位旗舰版,绿色软件,免费软件下载基地!

当前位置:主页 > 教程 > 服务器类 >

阿里云如何使用扩容磁盘接口

来源:技术员联盟┆发布时间:2017-11-30 06:38┆点击:

  当前仅支持对数据盘的扩容操作。

  只有数据盘类型为普通云盘、高效云盘、SSD 云盘,才可以进行扩容操作。

  挂载在实例上的数据盘,只有实例为 Running 或者 Stopped 状态时,才可以进行扩容操作。

  磁盘上如果正在执行打快照的操作,则此时不允许进行扩容操作。

  挂载在实例上的磁盘,在进行扩容操作后,需要在控制台或者使用 Open API 重启实例才能使扩容生效。

  扩容仅做磁盘容量的扩大,不做分区和文件系统的扩大,扩容完成后,用户还需要手动分配存储空间。

  请求参数

名称 类型 是否必须 描述
Action   String     系统规定参数,取值:ResizeDisk  
DiskId   String     磁盘的编号  
NewSize   Integer     希望扩容到的磁盘大小。
以 GB 为单位,取值范围为
Cloud:5 ~ 2000
 
ClientToken   String     用于保证请求的幂等性。由客户端生成该参数值,要保证在不同请求间唯一,最大不值过 64 个 ASCII 字符。  

  返回参数

  全是公共返回参数,详见公共返回参数

  错误码

错误代码 描述 Http 状态码 语义
InvalidDiskSize.TooSmall   Specified new disk size is less than the original disk size   403   指定的新磁盘容量比原磁盘容量小  
InvalidParameter   The specified parameter "NewSize" is not valid.   403   指定的新磁盘容量超出了限制范围  
OperationDenied   The status of the disk or the instance that the disk is attaching with does not support the operation   403   磁盘或者磁盘所挂载的实例状态不支持扩容  
OperationDenied   The type of the disk does not support the operation   403   磁盘类型不支持扩容  
InvalidDiskId.NotFound   The specified disk does not exist.   404   磁盘不存在  
InvalidInstanceId.NotFound   The specified instance does not exist.   404   磁盘所挂载的实例不存在  
InstanceExpiredOrInArrears   The specified operation is denied as your prepay instance is expired (prepay mode) or in arrears (afterpay mode).   403   磁盘挂载的实例过期  

  示例

  请求示例

  https://ecs.aliyuncs.com/?Action=ResizeDisk

  &DiskId=xxx

  &NewSize=1024

  &<公共请求参数>

  返回示例

  'XML'格式

  

  F3CD6886-D8D0-4FEE-B93E-1B73239673DE

  

  'JSON'格式

  {

  "RequestId": "F3CD6886-D8D0-4FEE-B93E-1B73239673DE"