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
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
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
volumes |
Yes |
Array of VolumesForBatchResizeVolume objects |
The list of disks to be expanded. |
bss_param |
No |
The extended parameter of yearly/monthly billing. |
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:
|
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
|
Response Parameters
Status code: 202
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
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 |
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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot