This API is used to change the type of a disk.
POST /v2/{project_id}/volumes/{volume_id}/retype
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
project_id |
Yes |
String |
The project ID. |
volume_id |
Yes |
String |
The disk ID. |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
os-retype |
Yes |
RetypeVolume object |
The request body of the disk type change. |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
new_type |
Yes |
String |
The new disk type. For details about the disk type change, see Changing the Disk Type. NOTE:
|
Status code: 202
Parameter |
Type |
Description |
|---|---|---|
job_id |
String |
The task ID. |
Status code: 400
Parameter |
Type |
Description |
|---|---|---|
error |
Error object |
The error code returned if an error occurs. For details about the error code, see Error Codes. |
Parameter |
Type |
Description |
|---|---|---|
code |
String |
The error code returned if an error occurs. For details about the error code, see Error Codes. |
message |
String |
The error message returned if an error occurs. |
https://{endpoint}/v2/{project_id}/volumes/{volume_id}/retype
{
"os-retype" : {
"new_type" : "SAS"
}
}
Status code: 202
Accepted
{
"job_id" : "4011af9965d85d3c0165d8628c650007"
}
Status code: 400
Bad Request
{
"error" : {
"message" : "XXXX",
"code" : "XXX"
}
}
Status Code |
Description |
|---|---|
202 |
Accepted |
400 |
Bad Request |
For details, see Error Codes.