Files
doc-exports/docs/evs/api-ref/evs_04_4008.html
lizaoxu ecf810a948 EVS API Update
Reviewed-by: Muller, Martin <martin.muller@t-systems.com>
Co-authored-by: lizaoxu <lizaoxu@huawei.com>
Co-committed-by: lizaoxu <lizaoxu@huawei.com>
2025-07-08 08:52:45 +00:00

209 lines
14 KiB
HTML

<a name="evs_04_4008"></a><a name="evs_04_4008"></a>
<h1 class="topictitle1">Changing the EVS Disk Type</h1>
<div id="body0000002005968894"><div class="section" id="evs_04_4008__section1325712116518"><h4 class="sectiontitle">Function</h4><p id="evs_04_4008__p192571313515">This API is used to change the type of a disk.</p>
</div>
<div class="section" id="evs_04_4008__section17257313512"><h4 class="sectiontitle">URI</h4><p id="evs_04_4008__p225710115519">POST /v2/{project_id}/volumes/{volume_id}/retype</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="evs_04_4008__table7258161195115" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameters</caption><thead align="left"><tr id="evs_04_4008__row7258911519"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="evs_04_4008__p1725815175112">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="evs_04_4008__p825819185115">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="evs_04_4008__p1425817113510">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="evs_04_4008__p12588185118">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="evs_04_4008__row122588112516"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="evs_04_4008__p1025911118516">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="evs_04_4008__p425991115119">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="evs_04_4008__p1825910115511">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="evs_04_4008__p425911111515">The project ID.</p>
</td>
</tr>
<tr id="evs_04_4008__row2025821175111"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="evs_04_4008__p10259131195118">volume_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="evs_04_4008__p52596113514">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="evs_04_4008__p182595120513">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="evs_04_4008__p1725910110515">The disk ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="evs_04_4008__section525916118512"><h4 class="sectiontitle">Request</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="evs_04_4008__request_RetypeVolumeRequestBody" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request body parameters</caption><thead align="left"><tr id="evs_04_4008__row626031115116"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="evs_04_4008__p226013110510">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="evs_04_4008__p202604195118">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="evs_04_4008__p102601111514">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="evs_04_4008__p192607114513">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="evs_04_4008__row426013119518"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="evs_04_4008__p122611317519">os-retype</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="evs_04_4008__p22612119511">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="evs_04_4008__p626118111515"><a href="#evs_04_4008__request_RetypeVolume">RetypeVolume</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="evs_04_4008__p126111117516">The request body of the disk type change.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="evs_04_4008__request_RetypeVolume"></a><a name="request_RetypeVolume"></a><table cellpadding="4" cellspacing="0" summary="" id="evs_04_4008__request_RetypeVolume" frame="border" border="1" rules="all"><caption><b>Table 3 </b>RetypeVolume</caption><thead align="left"><tr id="evs_04_4008__row1026312195111"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="evs_04_4008__p926311165112">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="evs_04_4008__p726311115119">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="evs_04_4008__p11263517515">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="evs_04_4008__p202636195116">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="evs_04_4008__row126351135118"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="evs_04_4008__p15263131155110">new_type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="evs_04_4008__p4263101185112">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="evs_04_4008__p6264141115113">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="evs_04_4008__p72644155113">The new disk type. For details about the disk type change, see <a href="https://docs.otc.t-systems.com/elastic-volume-service/umn/changing_the_evs_disk_type.html" target="_blank" rel="noopener noreferrer">Changing the Disk Type</a>.</p>
<div class="note" id="evs_04_4008__note14973851282"><span class="notetitle"> NOTE: </span><div class="notebody"><ul id="evs_04_4008__ul171118510917"><li id="evs_04_4008__li371118517910">If the specified disk type is not available in the AZ, the disk type change will fail.</li><li id="evs_04_4008__li11711105593">If the source disk type is backed by SAS, you can change the disk type to any of the other types.</li><li id="evs_04_4008__li1371118516913">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.</li></ul>
</div></div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="evs_04_4008__section102645116518"><h4 class="sectiontitle">Response</h4><p id="evs_04_4008__p13264116512"><strong id="evs_04_4008__b357192514432">Status code: 202</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="evs_04_4008__response_RetypeVolumeResponseBody" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Response body parameter</caption><thead align="left"><tr id="evs_04_4008__row12647112514"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p id="evs_04_4008__p62641310519">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.2"><p id="evs_04_4008__p32641317515">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.3.2.4.1.3"><p id="evs_04_4008__p126516195112">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="evs_04_4008__row182643119511"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="evs_04_4008__p1226551205111">job_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="evs_04_4008__p11265612516">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="evs_04_4008__p16265419511">The task ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="evs_04_4008__p1626661205111"><strong id="evs_04_4008__b1993319487447">Status code: 400</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="evs_04_4008__response_ErrorResponseBody" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Response body parameter</caption><thead align="left"><tr id="evs_04_4008__row6266111105110"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.4.1.1"><p id="evs_04_4008__p1826613135118">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.4.1.2"><p id="evs_04_4008__p1826614110516">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.5.2.4.1.3"><p id="evs_04_4008__p426713117518">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="evs_04_4008__row926671185117"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.1 "><p id="evs_04_4008__p8267201165111">error</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.2 "><p id="evs_04_4008__p1426711113519"><a href="#evs_04_4008__response_Error">Error</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.5.2.4.1.3 "><p id="evs_04_4008__p12672110518">The error code returned if an error occurs. For details about the error code, see <a href="evs_04_0038.html">Error Codes</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="evs_04_4008__response_Error"></a><a name="response_Error"></a><table cellpadding="4" cellspacing="0" summary="" id="evs_04_4008__response_Error" frame="border" border="1" rules="all"><caption><b>Table 6 </b>Error</caption><thead align="left"><tr id="evs_04_4008__row626717119513"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.6.2.4.1.1"><p id="evs_04_4008__p1267415514">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.6.2.4.1.2"><p id="evs_04_4008__p14268115513">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.6.2.4.1.3"><p id="evs_04_4008__p4268118514">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="evs_04_4008__row32676114510"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.1 "><p id="evs_04_4008__p162684175119">code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.2 "><p id="evs_04_4008__p162686120513">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.6.2.4.1.3 "><p id="evs_04_4008__p4268141125118">The error code returned if an error occurs. For details about the error code, see <a href="evs_04_0038.html">Error Codes</a>.</p>
</td>
</tr>
<tr id="evs_04_4008__row1826761175118"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.1 "><p id="evs_04_4008__p1326851195115">message</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.2 "><p id="evs_04_4008__p326811135119">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.6.2.4.1.3 "><p id="evs_04_4008__p8268111195118">The error message returned if an error occurs.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="evs_04_4008__section7269213518"><h4 class="sectiontitle">Example Requests</h4><pre class="screen" id="evs_04_4008__screen5269121165114">https://{endpoint}/v2/{project_id}/volumes/{volume_id}/retype
{
"os-retype" : {
"new_type" : "SAS"
}
}</pre>
</div>
<div class="section" id="evs_04_4008__section82691155115"><h4 class="sectiontitle">Example Responses</h4><p id="evs_04_4008__p527001135115"><strong id="evs_04_4008__b1921910454468">Status code: 202</strong></p>
<p id="evs_04_4008__p92704112513">Accepted</p>
<ul id="evs_04_4008__ul192704114517"><li id="evs_04_4008__li20270812519">Example 1<pre class="screen" id="evs_04_4008__screen12701716513">{
"job_id" : "4011af9965d85d3c0165d8628c650007"
}</pre>
</li></ul>
<p id="evs_04_4008__p727081155110"><strong id="evs_04_4008__b0721544466">Status code: 400</strong></p>
<p id="evs_04_4008__p527081105117">Bad Request</p>
<pre class="screen" id="evs_04_4008__screen1627112117518">{
"error" : {
"message" : "XXXX",
"code" : "XXX"
}
}</pre>
</div>
<div class="section" id="evs_04_4008__section174517111512"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="evs_04_4008__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="evs_04_4008__row12802013513"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="evs_04_4008__p19451121175110">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="evs_04_4008__p84514185116">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="evs_04_4008__row62809115113"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="evs_04_4008__p24516119517">202</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="evs_04_4008__p1545113118513">Accepted</p>
</td>
</tr>
<tr id="evs_04_4008__row1528091185118"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="evs_04_4008__p945119195116">400</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="evs_04_4008__p145141145110">Bad Request</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="evs_04_4008__section445171175117"><h4 class="sectiontitle">Error Codes</h4><p id="evs_04_4008__p6451131115111">For details, see <a href="evs_04_0038.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="evs_04_2002.html">Disk Management</a></div>
</div>
</div>