nav-img
Advanced

Changing the EVS Disk Type

Function

This API is used to change the type of a disk.

URI

POST /v2/{project_id}/volumes/{volume_id}/retype

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

The project ID.

volume_id

Yes

String

The disk ID.

Request

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

os-retype

Yes

The request body of the disk type change.

Table 3 RetypeVolume

Parameter

Mandatory

Type

Description

new_type

Yes

String

The new disk type. For details about the disk type change, see section "Changing the EVS Disk Type" in the Elastic Volume Service User Guide.

NOTE:
  • If the specified disk type is not available in the AZ, the disk type change will fail.
  • If the source disk type is backed by SAS, you can change the disk type to any of the other types.
  • If the source disk type is backed by SSD, you can only change to another SSD-backed disk type, but not the SAS-backed type.

Response

Status code: 202

Table 4 Response body parameter

Parameter

Type

Description

job_id

String

The task ID.

Status code: 400

Table 5 Response body parameter

Parameter

Type

Description

error

Error object

The error code returned if an error occurs. For details about the error code, see Error Codes.

Table 6 Error

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.

Example Requests

https://{endpoint}/v2/{project_id}/volumes/{volume_id}/retype
{
"os-retype" : {
"new_type" : "SAS"
}
}

Example Responses

Status code: 202

Accepted

  • Example 1
    {
    "job_id" : "4011af9965d85d3c0165d8628c650007"
    }

Status code: 400

Bad Request

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

Status Codes

Status Code

Description

202

Accepted

400

Bad Request

Error Codes

For details, see Error Codes.