Help Center/ Elastic Volume Service/ API Reference/ API/ Disk Management/ Expanding Capacities of Multiple Disks in a Batch
Updated on 2025-08-20 GMT+08:00

Expanding Capacities of Multiple Disks in a Batch

Function

This API is used to expand the capacities of multiple pay-per-use and yearly/monthly disks in a batch. - - -

Constraints

  • If the status of a to-be-expanded disk is available, there are no restrictions.

  • If the status of a to-be-expanded disk is in-use, the restrictions are as follows:

    • A shared disk cannot be expanded, which means that the value of multiattach must be false.

    • The status of the server to which the disk attached must be ACTIVE, PAUSED, SUSPENDED, or SHUTOFF.

Calling Method

For details, see Calling APIs.

URI

POST /v5/{project_id}/volumes/batch-extend

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

The project ID. For details about how to obtain the project ID, see Obtaining a Project ID.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

volumes

Yes

Array of VolumesForBatchResizeVolume objects

The list of disks to be expanded.

bss_param

No

PrepaidParamForBatchResizeVolume object

The extended parameter of yearly/monthly billing.

Table 3 VolumesForBatchResizeVolume

Parameter

Mandatory

Type

Description

id

Yes

String

The disk ID.

new_size

Yes

Integer

The new disk size, in GiB. This parameter value must be greater than the original disk size and less than the maximum size allowed for a disk.

The maximum disk size:

  • Data disk: 32,768 GiB

  • System disk: 1,024 GiB

Table 4 PrepaidParamForBatchResizeVolume

Parameter

Mandatory

Type

Description

is_auto_pay

No

String

Whether to pay immediately. This parameter is only valid when the disk is billed on a yearly/monthly basis. The default value is false.

Range

  • true: indicates to pay immediately after an order is created. The system will automatically deduct charges from the account balance.

  • false: An order is not paid immediately after being created.

Response Parameters

Status code: 202

Table 5 Response body parameters

Parameter

Type

Description

job_id

String

Definition

The task ID. This parameter is returned when the disk is billed on a pay-per-use basis.

To query the task status, see Querying Task Status.

Range

N/A

order_id

String

Definition

The order ID. This parameter is returned when the disk is billed on a yearly/monthly basis.

If you need to pay for the order, see Paying Yearly/Monthly Product Orders.

Range

N/A

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error

Error object

Definition

The error code returned if an error occurs. For the error codes and their meanings, see Error Codes.

Range

N/A

Table 7 Error

Parameter

Type

Description

code

String

Definition

The error code returned if an error occurs.

Range

For the error codes and their meanings, see Error Codes.

message

String

Definition

The error message returned if an error occurs.

Range

N/A

Example Requests

/v5/{project_id}/volumes/batch-extend

{
  "volumes" : [ {
    "id" : "756889eb-85ca-4ea5-9f07-df6b99ba1b0f",
    "new_size" : 100
  }, {
    "id" : "36d9bbf7-8a93-4e47-8ff0-37b614aa28d6",
    "new_size" : 200
  } ],
  "bss_param" : {
    "is_auto_pay" : true
  }
}

Example Responses

Status code: 202

Accepted

{
  "job_id" : "c6bdaf8975f9478e87365b1474e8774b"
}

Status code: 400

Bad Request

{
  "error" : {
    "message" : "XXXX",
    "code" : "XXX"
  }
}

Status Codes

Status Code

Description

202

Accepted

400

Bad Request

Error Codes

See Error Codes.