forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: guoyanyan <guoyanyan3@huawei.com> Co-committed-by: guoyanyan <guoyanyan3@huawei.com>
23 lines
3.2 KiB
HTML
23 lines
3.2 KiB
HTML
<a name="EN-US_TOPIC_0109822368"></a><a name="EN-US_TOPIC_0109822368"></a>
|
|
|
|
<h1 class="topictitle1">Deleting an Image</h1>
|
|
<div id="body6606141"><div class="section" id="EN-US_TOPIC_0109822368__section4544348"><h4 class="sectiontitle">Scenario</h4><p id="EN-US_TOPIC_0109822368__p2582252465">A private image can be deleted if it is no longer needed.</p>
|
|
<div class="note" id="EN-US_TOPIC_0109822368__note021013252910"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0109822368__en-us_topic_0109822404_p88501497167">The token obtained from IAM is valid for only 24 hours. If you want to use a token for authentication, you can cache it to avoid frequently calling the IAM API.</p>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0109822368__section32547936"><h4 class="sectiontitle">Involved APIs</h4><p class="litext" id="EN-US_TOPIC_0109822368__p23385131">If you use a token for authentication, you must obtain the token and add <strong id="EN-US_TOPIC_0109822368__en-us_topic_0109822381_b842352706134841">X-Auth-Token</strong> to the request header of the IMS API when making an API call.</p>
|
|
<ul id="EN-US_TOPIC_0109822368__ul1840113419200"><li id="EN-US_TOPIC_0109822368__li6754315">IAM API used to obtain the token<p id="EN-US_TOPIC_0109822368__en-us_topic_0109822381_p1833933634"><a name="EN-US_TOPIC_0109822368__li6754315"></a><a name="li6754315"></a>URI format: POST https://<em id="EN-US_TOPIC_0109822368__en-us_topic_0109822381_i15500165112426">IAM endpoint</em>/v3/auth/tokens</p>
|
|
</li><li id="EN-US_TOPIC_0109822368__li38945471">IMS API used to delete an image (Native OpenStack API)<p id="EN-US_TOPIC_0109822368__p1160141020392"><a name="EN-US_TOPIC_0109822368__li38945471"></a><a name="li38945471"></a>URI format: DELETE https://<em id="EN-US_TOPIC_0109822368__i77091425172312">IMS endpoint</em>/v2/images/<em id="EN-US_TOPIC_0109822368__i37091825122319">Image ID</em></p>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0109822368__section24495972"><h4 class="sectiontitle">Procedure</h4><ol id="EN-US_TOPIC_0109822368__ol163172032204610"><li id="EN-US_TOPIC_0109822368__li1837051910476">Obtain the token.</li><li class="msonormal" id="EN-US_TOPIC_0109822368__li1227855811466">Send <strong id="EN-US_TOPIC_0109822368__b08965113255">DELETE https://</strong><em id="EN-US_TOPIC_0109822368__i1811958152312">IMS endpoint</em><strong id="EN-US_TOPIC_0109822368__b16136195122517">/v2/images/</strong><em id="EN-US_TOPIC_0109822368__i15518464247">Image ID</em>.</li><li class="msonormal" id="EN-US_TOPIC_0109822368__li927865810468">Add <strong id="EN-US_TOPIC_0109822368__b84235270615255">X-Auth-Token</strong> to the request header.</li><li class="msonormal" id="EN-US_TOPIC_0109822368__li1727805811465">Check the status code. If the request is successful, <strong id="EN-US_TOPIC_0109822368__b842352706171255">204</strong> is returned.<p id="EN-US_TOPIC_0109822368__p13688656203119">For details about status codes for request errors, see <a href="en-us_topic_0124290300.html">Status Codes</a>.</p>
|
|
</li></ol>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0219492328.html">Common Scenarios</a></div>
|
|
</div>
|
|
</div>
|
|
|