doc-exports/docs/ims/api-ref/en-us_topic_0020092108.html
Zaoxu, Li c236478734 IMS API DOC
Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com>
Co-authored-by: Zaoxu, Li <lizaoxu@huawei.com>
Co-committed-by: Zaoxu, Li <lizaoxu@huawei.com>
2024-06-05 07:22:50 +00:00

124 lines
10 KiB
HTML

<a name="EN-US_TOPIC_0020092108"></a><a name="EN-US_TOPIC_0020092108"></a>
<h1 class="topictitle1">Deleting an Image (Native OpenStack API)</h1>
<div id="body18802902"><div class="section" id="EN-US_TOPIC_0020092108__section24723024"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0020092108__p46640084">This API is used to delete a private image. You can only delete your own private images.</p>
</div>
<div class="section" id="EN-US_TOPIC_0020092108__section21180630"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0020092108__p56283646">DELETE /v2/images/{image_id}</p>
<div class="p" id="EN-US_TOPIC_0020092108__p9721953151616"><a href="#EN-US_TOPIC_0020092108__table27262282">Table 1</a> lists the parameters in the URI.
<div class="tablenoborder"><a name="EN-US_TOPIC_0020092108__table27262282"></a><a name="table27262282"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0020092108__table27262282" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0020092108__row27551015"><th align="left" class="cellrowborder" valign="top" width="25.75%" id="mcps1.3.2.3.2.2.5.1.1"><p id="EN-US_TOPIC_0020092108__p17039762"><strong id="EN-US_TOPIC_0020092108__b1415227516105">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="24.81%" id="mcps1.3.2.3.2.2.5.1.2"><p id="EN-US_TOPIC_0020092108__p38043494"><strong id="EN-US_TOPIC_0020092108__b3505224916109">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.61%" id="mcps1.3.2.3.2.2.5.1.3"><p id="EN-US_TOPIC_0020092108__p1119157921331">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="30.830000000000002%" id="mcps1.3.2.3.2.2.5.1.4"><p id="EN-US_TOPIC_0020092108__p61624137">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0020092108__row25499238"><td class="cellrowborder" valign="top" width="25.75%" headers="mcps1.3.2.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0020092108__p52172387">image_id</p>
</td>
<td class="cellrowborder" valign="top" width="24.81%" headers="mcps1.3.2.3.2.2.5.1.2 "><p id="EN-US_TOPIC_0020092108__p65213800">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="18.61%" headers="mcps1.3.2.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0020092108__p3410274521331">String</p>
</td>
<td class="cellrowborder" valign="top" width="30.830000000000002%" headers="mcps1.3.2.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0020092108__p47826462">Specifies the image ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0020092108__section56407950"><h4 class="sectiontitle">Request</h4><div class="p" id="EN-US_TOPIC_0020092108__p67051657105819">Request parameters
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0020092108__table53011268153646" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0020092108__row8255548153646"><th align="left" class="cellrowborder" valign="top" width="24%" id="mcps1.3.3.2.1.1.5.1.1"><p id="EN-US_TOPIC_0020092108__p64719651153646">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.35%" id="mcps1.3.3.2.1.1.5.1.2"><p id="EN-US_TOPIC_0020092108__p7800370153646">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.709999999999999%" id="mcps1.3.3.2.1.1.5.1.3"><p id="EN-US_TOPIC_0020092108__p27850258153646">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="43.94%" id="mcps1.3.3.2.1.1.5.1.4"><p id="EN-US_TOPIC_0020092108__p41278443153646">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0020092108__row1512981414511"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.3.2.1.1.5.1.1 "><p id="EN-US_TOPIC_0020092108__p913051418459">delete_backup</p>
</td>
<td class="cellrowborder" valign="top" width="16.35%" headers="mcps1.3.3.2.1.1.5.1.2 "><p id="EN-US_TOPIC_0020092108__p5160122504510">No</p>
</td>
<td class="cellrowborder" valign="top" width="15.709999999999999%" headers="mcps1.3.3.2.1.1.5.1.3 "><p id="EN-US_TOPIC_0020092108__p10160202564511">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="43.94%" headers="mcps1.3.3.2.1.1.5.1.4 "><p id="EN-US_TOPIC_0020092108__p1813015143455">Specifies whether to delete the CSBS backups or CBR backups associated with a full-ECS image when the image is deleted. The value can be <strong id="EN-US_TOPIC_0020092108__b178711837122">true</strong> or <strong id="EN-US_TOPIC_0020092108__b168721034122">false</strong>.</p>
<ul id="EN-US_TOPIC_0020092108__ul119921040114519"><li id="EN-US_TOPIC_0020092108__li1799254019457"><strong id="EN-US_TOPIC_0020092108__b5287115861713">true</strong>: When a full-ECS image is deleted, its CSBS backups or CBR backups are also deleted.</li><li id="EN-US_TOPIC_0020092108__li139929402450"><strong id="EN-US_TOPIC_0020092108__b106876127187">false</strong>: When a full-ECS image is deleted, its CSBS backups or CBR backups are not deleted.</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0020092108__section1684561095415"><h4 class="sectiontitle">Example Request</h4><p id="EN-US_TOPIC_0020092108__p1490716299458">Deleting an image</p>
<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0020092108__screen21310128213346"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span>
<span class="normal">3</span>
<span class="normal">4</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">DELETE</span><span class="w"> </span><span class="n">https</span><span class="p">:</span><span class="c1">//{Endpoint}/v2/images/4ca46bf1-5c61-48ff-b4f3-0ad4e5e3ba90</span>
<span class="p">{</span>
<span class="w"> </span><span class="s">&quot;delete_backup&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span>
<span class="p">}</span>
</pre></div></td></tr></table></div>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0020092108__section37909503"><h4 class="sectiontitle">Response</h4><ul id="EN-US_TOPIC_0020092108__ul15382247173312"><li id="EN-US_TOPIC_0020092108__li12191609184">Response parameters<p id="EN-US_TOPIC_0020092108__p1379227111815"><a name="EN-US_TOPIC_0020092108__li12191609184"></a><a name="li12191609184"></a>None</p>
</li><li id="EN-US_TOPIC_0020092108__li33826472335">Example response<pre class="codeblock" id="EN-US_TOPIC_0020092108__codeblock9324557173450">STATUS CODE 204</pre>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0020092108__section5641212"><h4 class="sectiontitle">Returned Values</h4><ul id="EN-US_TOPIC_0020092108__ul17532027"><li id="EN-US_TOPIC_0020092108__li23570516">Normal<p id="EN-US_TOPIC_0020092108__p10808059"><a name="EN-US_TOPIC_0020092108__li23570516"></a><a name="li23570516"></a>204</p>
</li><li id="EN-US_TOPIC_0020092108__li30163672">Abnormal
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0020092108__table5314667917313" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0020092108__row4648913117313"><th align="left" class="cellrowborder" valign="top" width="46.54%" id="mcps1.3.6.2.2.1.1.3.1.1"><p id="EN-US_TOPIC_0020092108__p752327917313">Returned Value</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="53.459999999999994%" id="mcps1.3.6.2.2.1.1.3.1.2"><p id="EN-US_TOPIC_0020092108__p540582617313"><strong id="EN-US_TOPIC_0020092108__b49381322161029">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0020092108__row3521879917313"><td class="cellrowborder" valign="top" width="46.54%" headers="mcps1.3.6.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0020092108__p3415046017313">400 Bad Request</p>
</td>
<td class="cellrowborder" valign="top" width="53.459999999999994%" headers="mcps1.3.6.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0020092108__p1472385717313">Request error.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0020092108__row5178178317313"><td class="cellrowborder" valign="top" width="46.54%" headers="mcps1.3.6.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0020092108__p3357490117313">401 Unauthorized</p>
</td>
<td class="cellrowborder" valign="top" width="53.459999999999994%" headers="mcps1.3.6.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0020092108__p3521250017313">Authentication failed.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0020092108__row4847705217313"><td class="cellrowborder" valign="top" width="46.54%" headers="mcps1.3.6.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0020092108__p3432710217313">403 Forbidden</p>
</td>
<td class="cellrowborder" valign="top" width="53.459999999999994%" headers="mcps1.3.6.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0020092108__p2903189317313">You do not have the rights to perform the operation.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0020092108__row48061152191227"><td class="cellrowborder" valign="top" width="46.54%" headers="mcps1.3.6.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0020092108__p24571129191230">404 Not Found</p>
</td>
<td class="cellrowborder" valign="top" width="53.459999999999994%" headers="mcps1.3.6.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0020092108__p44104462191230">The requested resource was not found.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0020092108__row5996045217313"><td class="cellrowborder" valign="top" width="46.54%" headers="mcps1.3.6.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0020092108__p2495845317313">500 Internal Server Error</p>
</td>
<td class="cellrowborder" valign="top" width="53.459999999999994%" headers="mcps1.3.6.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0020092108__p836881417313">Internal service error.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0020092108__row821047017313"><td class="cellrowborder" valign="top" width="46.54%" headers="mcps1.3.6.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0020092108__p6106831917313">503 Service Unavailable</p>
</td>
<td class="cellrowborder" valign="top" width="53.459999999999994%" headers="mcps1.3.6.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0020092108__p4758680517313">The service is unavailable.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0122410334.html">Image (Native OpenStack APIs)</a></div>
</div>
</div>