All Products
Search
Document Center

Elastic Compute Service:ResizeDisk

Last Updated:Mar 19, 2024

Resizes a system disk or data disk.

Operation description

The ID of the disk. You can call the DescribeDisks operation to query the ID of a disk.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
DiskIdstringYes

The method that you want to use to resize the disk. Default value: offline. Valid values:

  • offline: resizes the disk offline. After you resize a disk offline, you must restart its associated instance by using the Elastic Compute Service (ECS) console or by calling the RebootInstance operation to make the resizing operation take effect. For information about how to restart an ECS instance in the ECS console, see Restart an instance.
  • online: resizes the disk online. After you resize a disk online, the resizing operation takes effect immediately and you do not need to restart the instance. Ultra disks, standard SSDs, and ESSDs can be resized online.
d-bp67acfmxazb4p****
TypestringNo

The new disk capacity. Unit: GiB. Valid values:

  • System disk: 20 to 500.

  • Data disk:

    • Ultra disk (cloud_efficiency): 20 to 32768.

    • Standard SSD (cloud_ssd): 20 to 32768.

    • ESSD (cloud_essd): Valid values when the NewSize parameter is set to cloud_essd depend on the PerformanceLevel value. You can call the DescribeDisks operation to query disk information and check the PerformanceLevel value in the response.

      • Valid values when PerformanceLevel is set to PL0: 40 to 32768.
      • Valid values when PerformanceLevel is set to PL1: 20 to 32768.
      • Valid values when PerformanceLevel is set to PL2: 461 to 32768.
      • Valid values when PerformanceLevel is set to PL3: 1261 to 32768.
    • Basic disk (cloud): 5 to 2000.

The new disk capacity must be greater than the original disk capacity.

offline
NewSizeintegerYes

32768

1900
ClientTokenstringNo

The ID of the order.

Note This parameter is returned only when you resize subscription disks.
123e4567-e89b-12d3-a456-426655440000

Response parameters

ParameterTypeDescriptionExample
object
OrderIdstring

The ID of the request.

20413515388****

Examples

Sample success responses

JSONformat

{
  "OrderId": "20413515388****",
  "RequestId": "F3CD6886-D8D0-4FEE-B93E-1B732396****"
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidDataDiskSize.ValueNotSupportedThe specified DataDisk.n.Size beyond the permitted range, or the capacity of snapshot exceeds the size limit of the specified disk category.The specified DataDisk.N.Size parameter is invalid or the snapshot size exceeds the maximum capacity allowed for the specified disk category.
400InvalidDataDiskCategory.ValueNotSupported%s-
400InvalidParameter.Conflict%sThe specified parameter is invalid. Check whether parameter conflicts exist. %s is a variable. An error message is dynamically returned based on call conditions.
400InvalidDataDiskSize.ValueNotSupported%s-
400InvalidSystemDiskSize.ValueNotSupported%sThe specified system disk size is invalid.
400IncompleteParamterSome fields can not be null in this request.Some required parameters are not specified.
400InvalidRegionId.MalFormedThe specified RegionId is not valid.The specified region does not exist.
400InvalidParam.TypeThe specified type is not supported.The specified Type parameter is invalid.
400LastOrderProcessingThe previous order is still processing, please try again later.The order is being processed. Try again later.
400InvalidStatus.UpgradingThe instance which the disk attachs is upgrading; please try again later.-
400InvalidSystemDiskSize.ImageNotSupportResizeThe image of the instance does not support resize.-
400InvalidSystemDiskSize.ImageNotSupportResizeThe specified image does not support resize.The specified image does not support resizing.
400InvalidDisk.DetachedSystemDiskThe specified disk is a detached system disk, does not support this operation.-
400OperationDenied.NotEnoughCapacityThe capacity of the current dedicated block storage cluster is not enough to expand.-
400IncorrectDiskStatus.ReplicationStatusNotFoundDisk replication status not found.-
400IncorrectDiskStatus.InReplicationDisk already in replication.-
400QuotaExceed.DiskCapacityThe used capacity of disk type has exceeded the quota in the zone, %s.The capacity of disks that belong to the specified disk category exceeds the quota limit for the zone.
403OperationDeniedThe type of the disk does not support the operation.The disk category does not support the specified operation.
403OperationDeniedThe status of the disk or the instance that the disk is attaching with does not support the operation.The disk or instance is in a state that does not support the current operation.
403InvalidDiskSize.TooSmallSpecified new disk size is less than the original disk size.The specified new disk capacity is smaller than the original disk capacity.
403InvalidDiskSize.TooLargeSpecified new disk size is beyond the permitted range.The size of the new disk is beyond the permitted range.
403InstanceExpiredOrInArrearsThe specified operation is denied as your prepay instance is expired (prepay mode) or in arrears (afterpay mode).The subscription instance has expired. You must renew the instance before you can proceed.
403DiskErrorIncorrect disk status.-
403DiskInArrearsThe specified operation is denied as your disk owing fee.Your account has overdue payments for the specified disk.
403IncorrectInstanceStatusThe current status of the resource does not support this operation.The resource is in a state that does not support the current operation.
403DiskCreatingSnapshotThe operation is denied due to a snapshot of the specified disk is not completed yet.A snapshot is being created for the specified disk.
403InvalidDiskSizeSpecified new disk size is less than or equal the original disk size.The new disk size must be greater than the original disk size.
403Operation.ConflictThe operation may conflicts with others.The operation conflicts with other operations.
403InstanceLockedForSecurityThe instance is locked due to security.The operation is not supported while the instance is locked for security reasons.
403IncorrectDiskStatusThe current disk status does not support this operation.The disk is in a state that does not support the current operation. Make sure that the disk is available and that your account has no overdue payments.
403UserNotInTheWhiteListThe user is not in disk white list.You are not authorized to manage the disk. Try again when you are authorized.
403InvalidDiskCategory.NotSupportedThe specified disk category is not supported.The specified disk category does not support this operation.
403InvalidRegion.NotSupportThe specified region does not support resize online.Online resizing is not supported in the region.
403InvalidDiskCategory.NotSupportedThe specified disk category does not support resize online.-
403IncorrectInstanceStatusThe current status of the resource does not support resize online.-
403InvalidInstanceStatus.NotRunningThe status of instance to which the disk attachs must be running when resizing online.The instance to which the disk is attached is not in the Running state when you resize the disk online.
403IncorrectDiskStatusThe current status of the resource does not support resize online.-
403InvalidOperation.InstanceTypeNotSupportOnlineResizeThe instance type of the specified instance does not support resize online.-
403InvalidParameter.KMSKeyId.CMKUnauthorizedThe CMK needs to be added ECS tag.-
403InvalidParameter.KMSKeyId.CMKNotEnabledThe CMK needs to be enabled.The customer master key (CMK) is not enabled when KMSKeyId is specified for an encrypted disk. You can call the DescribeKey operation of KMS to query information about the specified CMK.
403InvalidParameter.KMSKeyId.KMSUnauthorizedECS service have no right to access your KMS.ECS is not authorized to access your KMS resources.
403InstanceSpecModification.NotEffectiveThe instance which the disk attachs has been reserved for making a spec modification and not taken effective in the current contract period.-
403InvalidDiskSize.NotSupportResizeOnlineThe current size of the resource does not support resize online.-
403SecurityRisk.3DVerificationWe have detected a security risk with your default credit or debit card. Please proceed with verification via the link in your email.-
403QuotaExceeded.PostpaidDataDiskCapacityThe quota of postpaid data disk capacity exceeds.The used capacity of the pay-as-you-go disk reaches the quota limit.
403InvalidOperation.MultiAttachDiskNotSupportResizeOnlineMulti attach disk does not support resize online.Disks for which the multi-attach feature is enabled cannot be resized online.
404InvalidDiskId.NotFoundThe specified disk does not exist.The specified disk does not exist. Check whether the disk ID is correct.
404InvalidInstanceId.NotFoundThe specified InstanceId does not exist.The specified instance does not exist.
500InternalErrorThe request processing has failed due to some unknown error.An internal error has occurred. Try again later.
500InternalErrorThe request processing has failed due to some unknown error, exception or failure.An internal error has occurred. Try again later.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-10-18The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 403
    delete Error Codes: 404
    delete Error Codes: 500
2023-10-09The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
    delete Error Codes: 404
    delete Error Codes: 500
2023-05-16The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 403
    delete Error Codes: 404
    delete Error Codes: 500