Last Updated: Dec 12, 2017


When resizing a disk, consider the following:

  • Only data disks can be resized.
  • Only the following types of data disks can be resized: SSD cloud disks, Ultra cloud disks, and Basic cloud disks.
  • Data disks attached to an instance can be resized only when the instances are in Running or Stopped status.
  • If a snapshot is being created on a disk, resizing is not permitted.
  • The resizing of a disk attached to an instance takes effect only after the instance is restarted from the console or by using Open APIs.
  • Resizing is only applicable to the disk capacity, not to the partitions and the file system. After the resizing is completed, you must manually allocate the storage space.

Request parameters

Name Type Required Description
Action String Yes Value: ResizeDisk.
DiskId String Yes Indicates the ID of the disk.
NewSize Integer Yes Allows you to resize and expand the disk according to your requirements. The value range is in GBs. For cloud disks, the range is [5, 2000] GB.
ClientToken String No Used to ensure the idempotence of the request. The value is generated by a client. The client token must be unique among all requests and can contain up to 64 ASCII characters.

Response parameters

All parameters are common response parameters. For more information, see Common parameters.

Error codes

Error code Error message HTTP status code Meaning
InvalidDiskSize.TooSmall Specified new disk size is less than the original disk size. 403 The specified new disk capacity is smaller than the original capacity.
InvalidParameter The specified parameter NewSize is not valid. 403 The specified new disk capacity exceeds the permissible range.
OperationDenied The status of the disk or the instance that the disk is attaching with does not support the operation. 403 The status of the disk or instance it is attached to does not support resize.
OperationDenied The type of the disk does not support the operation. 403 The disk category does not support resize.
InvalidDiskId.NotFound The specified disk does not exist. 404 The disk does not exist.
InvalidInstanceId.NotFound The specified InstanceId does not exist. 404 The instance to which the disk is attached does not exist.
InstanceExpiredOrInArrears The specified operation is denied as your prepay instance is expired (prepay mode) or in overdue payment (afterpay mode). 403 The instance to which the disk is attached has expired.


Request example

  2. &DiskId=xxx
  3. &NewSize=1024
  4. &<Common Request Parameters>

Response example

XML format

  1. <ResizeDiskResponse>
  2. <RequestId>F3CD6886-D8D0-4FEE-B93E-1B73239673DE</RequestId>
  3. </ResizeDiskResponse>

JSON format

  1. {
  2. "RequestId": "F3CD6886-D8D0-4FEE-B93E-1B73239673DE"
  3. }
Thank you! We've received your feedback.