百度智能云

All Product Document

          Cloud Compute Service

          Disk Scaling and Type Change

          Change the configuration and scale up the specified disk, and modify the CDS disk capacity or type.

          • The configuration change and scale-up operation can be performed only when the disk is in the Running or Mounted status.
          • It is an asynchronous interface. You can query whether the extendStatus of disk is restored through the [Query Disk Details](BCC/API Reference/Disk Related Interface/Query Details of the Disk List.md) interface.

          Request Structure

          PUT /v{version}/volume/{volumeId}?{action}&clientToken={clientToken} HTTP/1.1
          Host: bcc.bj.baidubce.com
          Authorization: authorization string
           
          {
              "newCdsSizeInGB" : newCdsSizeInGB,
              "newVolumeType": newVolumeType
          }

          Request Header Field

          There are no other special header fields except the public header field.

          Request Parameters

          Parameter Name Type Required? Parameter Position Description
          version String Yes URL parameter API version number
          volumeId String Yes URL parameter Disk ID
          action String Yes Query Parameter This API value is "resize".
          clientToken String Yes Query Parameter Idempotent Token, which is an ASCII string with the length no more than 64 bits. See Idempotency of ClientToken for details.
          newCdsSizeInGB int No Request Body Parameter The capacity of scale-up disk must be an integer greater than current CDS capacity (GB), which is within 0 - 32,765 GB and an integral multiple of 5. This Snapshot parameter is required when the parameter snapshotId is null or does not exist.
          newVolumeType StorageType No Request Body Parameter New type of CDS disk after change. If it is of the prepaid disk, it does not allow to reduce the disk type. newVolumeType and newCdsSizeInGB should not be empty at the same time.

          Return Header Field

          There are no other special header fields except the common header field.

          Return Parameter

          No specific parameters are returned.

          Error Code

          Error Code Error Description HTTP Status Code Explanations
          Volume.DiskIdIsEmpty Volume id must be provided. 400 The disk ID should not be empty.
          Volume.DiskSizeInvalid Disk size in invalid. 400 The CDS disk size is invalid. It prompts an error 400.
          NoSuchObject The specified object is not found or resource do not exist. 404 The resource does not exist.
          OperationDenied Operation not available. 409 The operation is not available.
          Volume.DiskQuotaExceededLimit Number of volumes exceeds limit. 413 The number of CDS disks exceeds the limit.

          Request Instance

          PUT /v2/volume/v-3zmCcxbR?resize&clientToken=be31b98c-5e41-4838-9830-9be700de5a20 HTTP/1.1
          Host: bcc.bj.baidubce.com
          Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
          
          {
          	    "newCdsSizeInGB" : 10
                  "newVolumeType":ssd
          }

          Return Instance

          HTTP/1.1 200 OK
          x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
          Date: Wed, 03 Dec 2014 06:42:19 GMT
          Content-Type: application/json;charset=UTF-8
          Server: BWS
          Previous
          Release the CDS Disk(New)
          Next
          Roll Back a Disk