Files
doc-exports/docs/ecs/api-ref/en-us_topic_0022472988.html
wanghuijuan738 8f024b87ae ECS API 20251204 version. Adding an API Document.
Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com>
Co-authored-by: wanghuijuan738 <wanghuijuan738@huawei.com>
Co-committed-by: wanghuijuan738 <wanghuijuan738@huawei.com>
2025-12-17 11:05:14 +00:00

97 lines
8.6 KiB
HTML

<a name="EN-US_TOPIC_0022472988"></a><a name="EN-US_TOPIC_0022472988"></a>
<h1 class="topictitle1">Detaching an EVS Disk from an <span id="text49851734145110">ECS</span></h1>
<div id="body1449024938540"><div class="section" id="EN-US_TOPIC_0022472988__section131779110562"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0022472988__p3963222110562">This API is used to detach an EVS disk from an <span id="EN-US_TOPIC_0022472988__text7905123517511">ECS</span>.</p>
<p id="EN-US_TOPIC_0022472988__p398184022315">This API is an asynchronous API. After the detachment request is successfully delivered, a job ID is returned. This does not mean the detachment is complete. You need to call the API by referring to <a href="en-us_topic_0022225398.html">Querying Job Execution Status</a> to query the job status. The SUCCESS status indicates that the detachment is successful.</p>
</div>
<div class="section" id="EN-US_TOPIC_0022472988__section2114566910562"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0022472988__p2271714910562">DELETE /v1/{project_id}/cloudservers/{server_id}/detachvolume/{volume_id}</p>
<div class="p" id="EN-US_TOPIC_0022472988__p1884727162718"><a href="#EN-US_TOPIC_0022472988__table2814978410562">Table 1</a> describes the parameters in the URI.
<div class="tablenoborder"><a name="EN-US_TOPIC_0022472988__table2814978410562"></a><a name="table2814978410562"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0022472988__table2814978410562" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0022472988__row4149654710562"><th align="left" class="cellrowborder" valign="top" width="16%" id="mcps1.3.2.3.2.2.4.1.1"><p id="EN-US_TOPIC_0022472988__p37105578">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16%" id="mcps1.3.2.3.2.2.4.1.2"><p id="EN-US_TOPIC_0022472988__p52761866">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="68%" id="mcps1.3.2.3.2.2.4.1.3"><p id="EN-US_TOPIC_0022472988__p45852771">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0022472988__row3491217610562"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0022472988__p931403110562">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0022472988__p1623904210562">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0022472988__p37593705">Specifies the project ID.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0022472988__row12799156113429"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0022472988__p45509579113512">server_id</p>
</td>
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0022472988__p62397288113512">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0022472988__p21015586113512">Specifies the <span id="EN-US_TOPIC_0022472988__text12652194216171">ECS</span> ID.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0022472988__row24368930113434"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0022472988__p17993785113434">volume_id</p>
</td>
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0022472988__p48210456113434">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0022472988__p349907511364">Specifies the disk ID.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0022472988__row1414317356215"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0022472988__p9143203552117">delete_flag</p>
</td>
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0022472988__p614315359212">No</p>
</td>
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0022472988__p714373516219">Indicates whether to forcibly detach a data disk.</p>
<ul id="EN-US_TOPIC_0022472988__ul75218468223"><li id="EN-US_TOPIC_0022472988__li175254619227">If yes, set it to <strong id="EN-US_TOPIC_0022472988__b842352706162723">1</strong>.</li><li id="EN-US_TOPIC_0022472988__li65274632214">If no, set it to <strong id="EN-US_TOPIC_0022472988__b842352706162736">0</strong>.</li></ul>
<p id="EN-US_TOPIC_0022472988__p12240675359">It is set to <strong id="EN-US_TOPIC_0022472988__b84235270610333">0</strong> by default.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0022472988__section2710198810562"><h4 class="sectiontitle">Request</h4><p id="EN-US_TOPIC_0022472988__p8888504113624">None</p>
</div>
<div class="section" id="EN-US_TOPIC_0022472988__section3910292310562"><h4 class="sectiontitle">Response</h4><p id="EN-US_TOPIC_0022472988__p583313195412"><a href="#EN-US_TOPIC_0022472988__table2824153181913">Table 2</a> describes the response parameters.</p>
<div class="tablenoborder"><a name="EN-US_TOPIC_0022472988__table2824153181913"></a><a name="table2824153181913"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0022472988__table2824153181913" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0022472988__row11825193111915"><th align="left" class="cellrowborder" valign="top" width="16.85%" id="mcps1.3.4.3.2.4.1.1"><p id="EN-US_TOPIC_0022472988__p135632102272">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.98%" id="mcps1.3.4.3.2.4.1.2"><p id="EN-US_TOPIC_0022472988__p55632010102714">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="65.16999999999999%" id="mcps1.3.4.3.2.4.1.3"><p id="EN-US_TOPIC_0022472988__p125631410152717">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0022472988__row382615381910"><td class="cellrowborder" valign="top" width="16.85%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0022472988__p1882713151914">job_id</p>
</td>
<td class="cellrowborder" valign="top" width="17.98%" headers="mcps1.3.4.3.2.4.1.2 "><p id="EN-US_TOPIC_0022472988__p1182723161913">String</p>
</td>
<td class="cellrowborder" valign="top" width="65.16999999999999%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0022472988__p79774531157"><strong id="EN-US_TOPIC_0022472988__b99177181473">Definition</strong></p>
<p id="EN-US_TOPIC_0022472988__p12827133121914">Specifies the job ID returned after a job is delivered. The job ID can be used to query the job execution progress. For details about how to query the job execution status based on <strong id="EN-US_TOPIC_0022472988__b12638202184715">job_id</strong>, see <a href="en-us_topic_0022225397.html">Job Status Management</a>.</p>
<p id="EN-US_TOPIC_0022472988__p10609556134619"><strong id="EN-US_TOPIC_0022472988__b18323102216478">Range</strong></p>
<p id="EN-US_TOPIC_0022472988__p8453833853">N/A</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="EN-US_TOPIC_0022472988__p827131024410">For details about abnormal responses, see <a href="en-us_topic_0022067714.html">Responses (Jobs)</a>.</p>
</div>
<div class="section" id="EN-US_TOPIC_0022472988__section9591135616137"><h4 class="sectiontitle">Example Request</h4><p id="EN-US_TOPIC_0022472988__p55789382127">Detach a specified disk from an ECS.</p>
<pre class="screen" id="EN-US_TOPIC_0022472988__screen35351133165712">DELETE https://{endpoint}/v1/{project_id}/cloudservers/{server_id}/detachvolume/{volume_id}</pre>
</div>
<div class="section" id="EN-US_TOPIC_0022472988__section18271184161412"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="EN-US_TOPIC_0022472988__screen4283641172510">{
"job_id": "ff80808288d41e1b018990260955686a"
}</pre>
</div>
<div class="section" id="EN-US_TOPIC_0022472988__en-us_topic_0092803065_en-us_topic_0020212692_section22960139"><h4 class="sectiontitle">Returned Values</h4><p id="EN-US_TOPIC_0022472988__en-us_topic_0092803065_en-us_topic_0020212692_p23670760">See <a href="en-us_topic_0022067716.html">Returned Values for General Requests</a>.</p>
</div>
<div class="section" id="EN-US_TOPIC_0022472988__en-us_topic_0092803065_en-us_topic_0067161469_en-us_topic_0057973179_section23611955"><h4 class="sectiontitle">Error Codes</h4><p id="EN-US_TOPIC_0022472988__p1682293982914">See <a href="en-us_topic_0022067717.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0111860831.html">Disk Management</a></div>
</div>
</div>