doc-exports/docs/evs/dev/evs_03_0007.html
Zaoxu, Li 305c41bb57 EVS 2.0.38 SP1 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Zaoxu, Li <lizaoxu@huawei.com>
Co-committed-by: Zaoxu, Li <lizaoxu@huawei.com>
2022-10-19 22:27:18 +00:00

88 lines
6.0 KiB
HTML

<a name="evs_03_0007"></a><a name="evs_03_0007"></a>
<h1 class="topictitle1">Deleting an EVS Snapshot</h1>
<div id="body1540284398448"><div class="section" id="evs_03_0007__section1063418559011"><h4 class="sectiontitle">Scenarios</h4><p id="evs_03_0007__p103811025348">If an EVS snapshot is no longer used, you can delete it to release virtual resources.</p>
</div>
<div class="section" id="evs_03_0007__section28146133118"><h4 class="sectiontitle">Constraints</h4><ul id="evs_03_0007__ul34741833103418"><li id="evs_03_0007__en-us_topic_0051408625_li11474933113414">A snapshot can be deleted only when it is in the <strong id="evs_03_0007__en-us_topic_0051408625_b191351948195211">available</strong> or <strong id="evs_03_0007__en-us_topic_0051408625_b1915655195218">error</strong> state.</li></ul>
</div>
<div class="section" id="evs_03_0007__section1531361811311"><h4 class="sectiontitle">Involved APIs</h4><p id="evs_03_0007__p33281854345">Query the snapshot list, obtain the ID of the target snapshot, and then delete the snapshot.</p>
<p id="evs_03_0007__p73251180314">To meet the preceding requirements, call the following APIs:</p>
<ul id="evs_03_0007__ul1545272719369"><li id="evs_03_0007__li104521627123617">Query EVS snapshots.</li><li id="evs_03_0007__li44521727133619">Delete an EVS snapshot.</li></ul>
</div>
<div class="section" id="evs_03_0007__section16886203916519"><h4 class="sectiontitle">Procedure</h4><ol id="evs_03_0007__ol081544055118"><li id="evs_03_0007__li581684015116">Query the EVS snapshots.<ul id="evs_03_0007__evs_03_0004_ul118162040125112"><li id="evs_03_0007__evs_03_0004_li158161740155110">API information<p id="evs_03_0007__evs_03_0004_p670222213411"><a name="evs_03_0007__evs_03_0004_li158161740155110"></a><a name="evs_03_0004_li158161740155110"></a>URI format: GET /v3/{project_id}/snapshots</p>
<p id="evs_03_0007__evs_03_0004_p116419475511">For details, see <strong id="evs_03_0007__b842352706154153">OpenStack Cinder API v3</strong> &gt; <strong id="evs_03_0007__b84235270615422">EVS Snapshot</strong> &gt; <strong id="evs_03_0007__b842352706154211">Querying EVS Snapshots</strong> in the <em id="evs_03_0007__i886446318154217">Elastic Volume Service API Reference</em>.</p>
</li><li id="evs_03_0007__evs_03_0004_li17816340125118">Example request<p id="evs_03_0007__evs_03_0004_p31824912620"><a name="evs_03_0007__evs_03_0004_li17816340125118"></a><a name="evs_03_0004_li17816340125118"></a>GET /v3/000efdc5f9064584b718b181df137bd7/snapshots</p>
</li><li id="evs_03_0007__evs_03_0004_li4816124025117">Example response<pre class="screen" id="evs_03_0007__screen51752612399">{
"snapshots": [
{
"created_at": "2016-02-16T16:54:14.981520",
"description": null,
"id": "b836dc3d-4e10-4ea4-a34c-8f6b0460a583",
"metadata": { },
"name": "test01",
"size": 1,
"status": "available",
"volume_id": "ba5730ea-8621-4ae8-b702-ff0ffc12c209",
"updated_at": null
},
{
"created_at": "2016-02-16T16:54:19.475397",
"description": null,
"id": "83be494d-329e-4a78-8ac5-9af900f48b95",
"metadata": { },
"name": "test02",
"size": 1,
"status": "available",
"volume_id": "ba5730ea-8621-4ae8-b702-ff0ffc12c209",
"updated_at": null
},
{
"created_at": "2016-02-16T16:54:24.367414",
"description": null,
"id": "dd360f46-7593-4d35-8f2c-5566fd0bd79e",
"metadata": { },
"name": "test03",
"size": 1,
"status": "available",
"volume_id": "ba5730ea-8621-4ae8-b702-ff0ffc12c209",
"updated_at": null
},
{
"created_at": "2016-02-16T16:54:29.766740",
"description": null,
"id": "4c29796a-8cf4-4482-9afc-e66da9a81240",
"metadata": { },
"name": "test04",
"size": 1,
"status": "available",
"volume_id": "ba5730ea-8621-4ae8-b702-ff0ffc12c209",
"updated_at": null
}
],
"snapshots_links": null
}</pre>
</li></ul>
</li><li id="evs_03_0007__li17817114010516">Delete the snapshot.<ul id="evs_03_0007__ul7179711194019"><li id="evs_03_0007__li5817940105111">API information<p id="evs_03_0007__p75101049862"><a name="evs_03_0007__li5817940105111"></a><a name="li5817940105111"></a>URI format: DELETE /v3/{project_id}/snapshots/{snapshot_id}</p>
<p id="evs_03_0007__p19381155416718">For details, see <strong id="evs_03_0007__b1667798815">OpenStack Cinder API v3</strong> &gt; <strong id="evs_03_0007__b1791327327">EVS Snapshot</strong> &gt; <strong id="evs_03_0007__b1170677876">Deleting an EVS Snapshot</strong> in the <em id="evs_03_0007__i1843643391">Elastic Volume Service API Reference</em>.</p>
</li><li id="evs_03_0007__li18176402515">Example request<p id="evs_03_0007__p08548399814"><a name="evs_03_0007__li18176402515"></a><a name="li18176402515"></a>DELETE /v3/000efdc5f9064584b718b181df137bd7/snapshots/b836dc3d-4e10-4ea4-a34c-8f6b0460a583</p>
</li><li id="evs_03_0007__li8186131113409">Example response<p id="evs_03_0007__evs_03_0004_p1581710408519"><a name="evs_03_0007__li8186131113409"></a><a name="li8186131113409"></a>None</p>
<div class="p" id="evs_03_0007__evs_03_0004_p723312591897">or<pre class="screen" id="evs_03_0007__evs_03_0004_screen2699535114213">{
"error": {
"message": "XXXX",
"code": "XXX"
}
}</pre>
</div>
<div class="p" id="evs_03_0007__evs_03_0004_p92381159293">In the preceding example, <strong id="evs_03_0007__evs_03_0004_b842352706143959">error</strong> indicates a general error, for example, <strong id="evs_03_0007__evs_03_0004_b842352706144438">badRequest</strong> or <strong id="evs_03_0007__evs_03_0004_b842352706144454">itemNotFound</strong>. An example is provided as follows:<pre class="screen" id="evs_03_0007__evs_03_0004_screen5305191315435">{
"badRequest": {
"message": "XXXX",
"code": "XXX"
}
}</pre>
</div>
</li></ul>
</li></ol>
</div>
</div>