When resizing a disk, consider the following:
- Only data disks can be resized.
- Only the following types of data diskss 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 need to manually allocate the storage space.
|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 5GB - 2000GBs.|
|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.|
All parameters are public return parameters. For details, refer to Public Return Parameters.
|Error Code||Description||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 the disk is attached to 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 the disk is attached to has expired.|
&<Public Request Parameters>