forked from docs/doc-exports
Reviewed-by: Muller, Martin <martin.muller@t-systems.com> Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com> Co-authored-by: zhangyue <zhangyue164@huawei.com> Co-committed-by: zhangyue <zhangyue164@huawei.com>
201 lines
14 KiB
HTML
201 lines
14 KiB
HTML
<a name="evs_04_2042"></a><a name="evs_04_2042"></a>
|
|
|
|
<h1 class="topictitle1">Querying EVS Resources by Tag (Deprecated)</h1>
|
|
<div id="body1501058885368"><div class="section" id="evs_04_2042__section5299350116935"><h4 class="sectiontitle">Function</h4><p id="evs_04_2042__p6461522216935">This API is used to query the EVS resources by tag.</p>
|
|
<div class="notice" id="evs_04_2042__note182951651102614"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="evs_04_2042__p29514165276">This API has been deprecated. Use another API. For details, see <a href="evs_04_3018.html">Querying Details of EVS Disks by Tag</a>.</p>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="evs_04_2042__section4466609116935"><h4 class="sectiontitle">Constraints</h4><p id="evs_04_2042__p6118358516935">None</p>
|
|
</div>
|
|
<div class="section" id="evs_04_2042__section1378135716935"><h4 class="sectiontitle">URI</h4><ul id="evs_04_2042__ul4254812316935"><li id="evs_04_2042__li4738879116935">URI format<p id="evs_04_2042__p34436112164848"><a name="evs_04_2042__li4738879116935"></a><a name="li4738879116935"></a>GET /v2/{project_id}/os-vendor-tags/{resource_type}/resource_instances</p>
|
|
<p id="evs_04_2042__p1145515721810">Examples:</p>
|
|
<ul id="evs_04_2042__ul2377871621828"><li id="evs_04_2042__li1892052521824">https://{{evs_url}}/v2/{{project_id}}/os-vendor-tags/volumes/resource_instances?tags={'test':['test']}</li><li id="evs_04_2042__li1955412421830">https://{{evs_url}}/v2/{{project_id}}/os-vendor-tags/volumes/resource_instances</li></ul>
|
|
</li><li id="evs_04_2042__li1328688716935">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="evs_04_2042__table28484833104128" frame="border" border="1" rules="all"><thead align="left"><tr id="evs_04_2042__row60547305104128"><th align="left" class="cellrowborder" valign="top" width="28.57%" id="mcps1.3.3.2.2.1.1.4.1.1"><p id="evs_04_2042__p5384679104128">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="26.529999999999998%" id="mcps1.3.3.2.2.1.1.4.1.2"><p id="evs_04_2042__p33505894104128">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="44.9%" id="mcps1.3.3.2.2.1.1.4.1.3"><p id="evs_04_2042__p29622926104128">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="evs_04_2042__row50646790104128"><td class="cellrowborder" valign="top" width="28.57%" headers="mcps1.3.3.2.2.1.1.4.1.1 "><p id="evs_04_2042__p8749302104128">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="26.529999999999998%" headers="mcps1.3.3.2.2.1.1.4.1.2 "><p id="evs_04_2042__p37604871104128">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.9%" headers="mcps1.3.3.2.2.1.1.4.1.3 "><p id="evs_04_2042__p26095712104128">Specifies the project ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="evs_04_2042__row40869685152038"><td class="cellrowborder" valign="top" width="28.57%" headers="mcps1.3.3.2.2.1.1.4.1.1 "><p id="evs_04_2042__p33171521152058">resource_type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="26.529999999999998%" headers="mcps1.3.3.2.2.1.1.4.1.2 "><p id="evs_04_2042__p2538652152058">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.9%" headers="mcps1.3.3.2.2.1.1.4.1.3 "><p id="evs_04_2042__p42707547152038">Specifies the resource type. The value can be <strong id="evs_04_2042__b842352706193556">volumes</strong>, <strong id="evs_04_2042__b84235270619367">snapshots</strong>, or <strong id="evs_04_2042__b842352706193615">backups</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li><li id="evs_04_2042__li28433766">Request filter parameters
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="evs_04_2042__table54577306" frame="border" border="1" rules="all"><thead align="left"><tr id="evs_04_2042__row28922261"><th align="left" class="cellrowborder" valign="top" width="15.409999999999998%" id="mcps1.3.3.2.3.1.1.5.1.1"><p id="evs_04_2042__p61001774">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="13.91%" id="mcps1.3.3.2.3.1.1.5.1.2"><p id="evs_04_2042__p42196623">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="16.35%" id="mcps1.3.3.2.3.1.1.5.1.3"><p id="evs_04_2042__p62483297">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="54.33%" id="mcps1.3.3.2.3.1.1.5.1.4"><p id="evs_04_2042__p27982283">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="evs_04_2042__row50513961"><td class="cellrowborder" valign="top" width="15.409999999999998%" headers="mcps1.3.3.2.3.1.1.5.1.1 "><p id="evs_04_2042__p30237605165039">tags</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.91%" headers="mcps1.3.3.2.3.1.1.5.1.2 "><p id="evs_04_2042__p38531802">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.35%" headers="mcps1.3.3.2.3.1.1.5.1.3 "><p id="evs_04_2042__p34068253">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54.33%" headers="mcps1.3.3.2.3.1.1.5.1.4 "><p id="evs_04_2042__p65671492181059">Specifies to query the EVS resources owning the tags in the filtering tag.</p>
|
|
<p id="evs_04_2042__p1883368165151">For example, if the filtering tag is <strong id="evs_04_2042__b842352706203359">tags={'a':['b', 'c'], 'd':['e']}</strong>, EVS resources owning tags (key is <strong id="evs_04_2042__b842352706203853">a</strong> and value is <strong id="evs_04_2042__b842352706203857">b</strong> or <strong id="evs_04_2042__b84235270620390">c</strong>) and tags (key is <strong id="evs_04_2042__b84235270620395">d</strong> and value is <strong id="evs_04_2042__b84235270620398">e</strong>) are queried.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="evs_04_2042__row5477191"><td class="cellrowborder" valign="top" width="15.409999999999998%" headers="mcps1.3.3.2.3.1.1.5.1.1 "><p id="evs_04_2042__p31507053165039">tags_any</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.91%" headers="mcps1.3.3.2.3.1.1.5.1.2 "><p id="evs_04_2042__p32609666">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.35%" headers="mcps1.3.3.2.3.1.1.5.1.3 "><p id="evs_04_2042__p24137296">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54.33%" headers="mcps1.3.3.2.3.1.1.5.1.4 "><p id="evs_04_2042__p2148140218111">Specifies to query EVS resources owing one of the tags in the filtering tag.</p>
|
|
<p id="evs_04_2042__p50690543165151">For example, if the filtering tag is <strong id="evs_04_2042__b960925150">tags_any={'a':['b', 'c'], 'd':['e']}</strong>, EVS resources owning tags (key is <strong id="evs_04_2042__b403407589">a</strong> and value is <strong id="evs_04_2042__b1987107971">b</strong> or <strong id="evs_04_2042__b417885841">c</strong>) or tags (key is <strong id="evs_04_2042__b1492244230">d</strong> and value is <strong id="evs_04_2042__b972987500">e</strong>) are queried.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="evs_04_2042__row38858233"><td class="cellrowborder" valign="top" width="15.409999999999998%" headers="mcps1.3.3.2.3.1.1.5.1.1 "><p id="evs_04_2042__p17410218165039">not_tags</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.91%" headers="mcps1.3.3.2.3.1.1.5.1.2 "><p id="evs_04_2042__p2294440">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.35%" headers="mcps1.3.3.2.3.1.1.5.1.3 "><p id="evs_04_2042__p51631922">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54.33%" headers="mcps1.3.3.2.3.1.1.5.1.4 "><p id="evs_04_2042__p29712730181116">Specifies to query EVS resources not owning the tags in the filtering tag.</p>
|
|
<p id="evs_04_2042__p57150714165151">For example, if the filtering tag is <strong id="evs_04_2042__b114499126">not_tags={'a':['b', 'c'], 'd':['e']}</strong>, EVS resources not owning tags (key is <strong id="evs_04_2042__b671450021">a</strong> and value is <strong id="evs_04_2042__b272043073">b</strong> or <strong id="evs_04_2042__b1607091232">c</strong>) and tags (key is <strong id="evs_04_2042__b1851004301">d</strong> and value is <strong id="evs_04_2042__b1877249762">e</strong>) are queried.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="evs_04_2042__row865613"><td class="cellrowborder" valign="top" width="15.409999999999998%" headers="mcps1.3.3.2.3.1.1.5.1.1 "><p id="evs_04_2042__p8474185165039">not_tags_any</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.91%" headers="mcps1.3.3.2.3.1.1.5.1.2 "><p id="evs_04_2042__p42147045">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.35%" headers="mcps1.3.3.2.3.1.1.5.1.3 "><p id="evs_04_2042__p58467488">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54.33%" headers="mcps1.3.3.2.3.1.1.5.1.4 "><p id="evs_04_2042__p28872281181125">Specifies to query EVS resources not owning one of the tags in the filtering tag.</p>
|
|
<p id="evs_04_2042__p63524872165151">For example, if the filtering tag is <strong id="evs_04_2042__b1847888531">not_tags={'a':['b', 'c'], 'd':['e']}</strong>, EVS resources not owning tags (key is <strong id="evs_04_2042__b336711424">a</strong> and value is <strong id="evs_04_2042__b1946822310">b</strong> or <strong id="evs_04_2042__b83489123">c</strong>) or tags (key is <strong id="evs_04_2042__b1870782073">d</strong> and value is <strong id="evs_04_2042__b1617975294">e</strong>) are queried.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="evs_04_2042__section5573802716935"><h4 class="sectiontitle">Request</h4><p id="evs_04_2042__p1848634016935">None</p>
|
|
</div>
|
|
<div class="section" id="evs_04_2042__section3215934016935"><h4 class="sectiontitle">Response</h4><ul id="evs_04_2042__ul5476973316935"><li id="evs_04_2042__li2316555316935">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="evs_04_2042__table716338716935" frame="border" border="1" rules="all"><thead align="left"><tr id="evs_04_2042__row2937460716935"><th align="left" class="cellrowborder" valign="top" width="19.05%" id="mcps1.3.5.2.1.1.1.4.1.1"><p id="evs_04_2042__p3053299616935">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="23.810000000000002%" id="mcps1.3.5.2.1.1.1.4.1.2"><p id="evs_04_2042__p5725363416935">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="57.14%" id="mcps1.3.5.2.1.1.1.4.1.3"><p id="evs_04_2042__p3278200616935">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="evs_04_2042__row63271571172633"><td class="cellrowborder" valign="top" width="19.05%" headers="mcps1.3.5.2.1.1.1.4.1.1 "><p id="evs_04_2042__p24723652172633">total_count</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.810000000000002%" headers="mcps1.3.5.2.1.1.1.4.1.2 "><p id="evs_04_2042__p56458834172633">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="57.14%" headers="mcps1.3.5.2.1.1.1.4.1.3 "><p id="evs_04_2042__p52593571172633">Specifies the number of EVS resources.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="evs_04_2042__row3809682916935"><td class="cellrowborder" valign="top" width="19.05%" headers="mcps1.3.5.2.1.1.1.4.1.1 "><p id="evs_04_2042__p6594430016935">resources</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.810000000000002%" headers="mcps1.3.5.2.1.1.1.4.1.2 "><p id="evs_04_2042__p3988810816935">list</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="57.14%" headers="mcps1.3.5.2.1.1.1.4.1.3 "><p id="evs_04_2042__p4842047816935">Specifies the EVS resource lists.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
<ul id="evs_04_2042__ul3313111816935"><li id="evs_04_2042__li2974460716935">Example response<pre class="screen" id="evs_04_2042__screen12165887165222">{
|
|
"total_count": 2,
|
|
"resources": [
|
|
{
|
|
"resource_name": null,
|
|
"resource_detail": {
|
|
"status": "available",
|
|
"description": null,
|
|
"availability_zone": "az-dc-1",
|
|
"updated_at": "2017-07-26T08:14:07.857625",
|
|
"source_volid": null,
|
|
"snapshot_id": null,
|
|
"id": "47cc4949-447a-43dc-b482-a1d7917fef69",
|
|
"size": 45,
|
|
"name": null,
|
|
"bootable": "true",
|
|
"created_at": "2017-07-26T08:09:39.787432",
|
|
"multiattach": false
|
|
},
|
|
"tags": {
|
|
"a": "c",
|
|
"d": "e"
|
|
},
|
|
"resource_id": "47cc4949-447a-43dc-b482-a1d7917fef69"
|
|
},
|
|
{
|
|
"resource_name": null,
|
|
"resource_detail": {
|
|
"status": "available",
|
|
"description": null,
|
|
"availability_zone": "az-dc-1",
|
|
"updated_at": "2017-07-26T08:02:11.250455",
|
|
"source_volid": null,
|
|
"snapshot_id": null,
|
|
"id": "588e94ef-eb2d-4895-a692-18163a7eeddc",
|
|
"size": 100,
|
|
"name": null,
|
|
"bootable": "false",
|
|
"created_at": "2017-07-26T08:00:51.563309",
|
|
"multiattach": false
|
|
},
|
|
"tags": {
|
|
"a": "c",
|
|
"d": "e"
|
|
},
|
|
"resource_id": "588e94ef-eb2d-4895-a692-18163a7eeddc"
|
|
}
|
|
]
|
|
}</pre>
|
|
<p id="evs_04_2042__p52821068113531">or</p>
|
|
<pre class="screen" id="evs_04_2042__screen41555256154916">{
|
|
"error": {
|
|
"message": "XXXX",
|
|
"code": "XXX"
|
|
}
|
|
}</pre>
|
|
<p id="evs_04_2042__p5655715720175">In the preceding example, <strong id="evs_04_2042__b842352706143959">error</strong> indicates a general error, for example, <strong id="evs_04_2042__b842352706144438">badRequest</strong> or <strong id="evs_04_2042__b842352706144454">itemNotFound</strong>. An example is provided as follows:</p>
|
|
<pre class="screen" id="evs_04_2042__screen27858742154933">{
|
|
"computeFault": {
|
|
"message": "The server has either erred or is incapable of performing the requested operation.",
|
|
"code": 500
|
|
}
|
|
}</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="evs_04_2042__section6050296116935"><h4 class="sectiontitle">Status Codes</h4><ul id="evs_04_2042__ul179279516935"><li id="evs_04_2042__li1613516116935">Normal<p id="evs_04_2042__p1099872616935"><a name="evs_04_2042__li1613516116935"></a><a name="li1613516116935"></a>200</p>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="evs_04_2042__section431317151242"><h4 class="sectiontitle">Error Codes</h4><p id="evs_04_2042__evs_04_2013_p783819215242">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_2024.html">Tag Management</a></div>
|
|
</div>
|
|
</div>
|
|
|