forked from docs/doc-exports
Reviewed-by: Ziuzko, Alevtina <alevtina.ziuzko@t-systems.com> Co-authored-by: Wei, Hongmin <weihongmin1@huawei.com> Co-committed-by: Wei, Hongmin <weihongmin1@huawei.com>
349 lines
24 KiB
HTML
349 lines
24 KiB
HTML
<a name="ListResource"></a><a name="ListResource"></a>
|
|
|
|
<h1 class="topictitle1">Querying Resources by Tag</h1>
|
|
<div id="body8662426"><div class="section" id="ListResource__section175522412166"><h4 class="sectiontitle">Function</h4><p id="ListResource__p1455214111617">You can use this API to filter resources by tag.</p>
|
|
</div>
|
|
<div class="section" id="ListResource__section555314111612"><h4 class="sectiontitle">URI</h4><p id="ListResource__p16554741171614">POST /v1.0/resource-instances/filter</p>
|
|
</div>
|
|
<div class="section" id="ListResource__section12554184121616"><h4 class="sectiontitle">Request</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ListResource__en-us_topic_0000001521382121_en-us_topic_0000001420719636_HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Header parameters</caption><thead align="left"><tr id="ListResource__row3555841171611"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="ListResource__p75561141111614">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="ListResource__p14557541121615">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="ListResource__p1255764111163">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="ListResource__p12557134118169">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ListResource__row8555194117165"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="ListResource__p255824120165">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="ListResource__p1555814141611">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="ListResource__p14559641121613">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="ListResource__p15560134111615">Specifies the user token. TMS is a global service. So you need to set <strong id="ListResource__b87933591725">scope</strong> to <strong id="ListResource__b16793155910212">domain</strong> when calling an IAM API to obtain a user token. The value of <strong id="ListResource__b43635687335221">X-Subject-Token</strong> in the response header is the user token.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ListResource__en-us_topic_0000001521382121_en-us_topic_0000001420719636_request_ResqTagResource" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Body parameters</caption><thead align="left"><tr id="ListResource__row05611241181615"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="ListResource__p18577114141613">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="ListResource__p157811411169">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="ListResource__p757814416168">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="ListResource__p857934116162">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ListResource__row14561124151620"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="ListResource__p157910416166">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="ListResource__p7580154151616">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="ListResource__p958154141614">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="ListResource__p1058111417167">Project ID. This parameter is mandatory when resource_type is a region-specific service.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListResource__row195612041151615"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="ListResource__p358294118162">resource_types</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="ListResource__p16582114161613">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="ListResource__p20583194113169">Array of strings</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="ListResource__p1758374131611">Resource type. This parameter is case-sensitive. Supported resource types can be provided as ecs,scaling_group, images, disk,vpcs,security-groups, shared_bandwidth,eip, cdn.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListResource__row2056110412162"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="ListResource__p4584184191619">tags</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="ListResource__p9584144171614">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="ListResource__p7585184171617">Array of <a href="#ListResource__en-us_topic_0000001521382121_en-us_topic_0000001420719636_request_Tag">Tag</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="ListResource__p15868412162">Tags</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListResource__row25611641141617"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="ListResource__p458615419168">without_any_tag</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="ListResource__p16587134116167">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="ListResource__p16588154141613">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="ListResource__p55881413161">Specifies whether to query only untagged resources. If this parameter is set to true, only untagged resources are queried.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListResource__row457617416169"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="ListResource__p6589144112164">offset</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="ListResource__p558954151610">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="ListResource__p14590144119164">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="ListResource__p135901241191618">Index position. The query starts from the next data specified by offset. The value must be a number and cannot be negative. The default value is <strong id="ListResource__b729955442712">0</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListResource__row1157614113163"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="ListResource__p159194111160">limit</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="ListResource__p1059104121616">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="ListResource__p19591144116162">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="ListResource__p1459284114166">The maximum queries supported. The value 200 is used by default if this parameter is not set. The value range is 1 to 200.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="ListResource__en-us_topic_0000001521382121_en-us_topic_0000001420719636_request_Tag"></a><a name="en-us_topic_0000001521382121_en-us_topic_0000001420719636_request_Tag"></a><table cellpadding="4" cellspacing="0" summary="" id="ListResource__en-us_topic_0000001521382121_en-us_topic_0000001420719636_request_Tag" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Tag</caption><thead align="left"><tr id="ListResource__row3593174181618"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.1"><p id="ListResource__p659594110165">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.2"><p id="ListResource__p1159554191618">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.3"><p id="ListResource__p155966419165">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.4.2.5.1.4"><p id="ListResource__p1659624110162">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ListResource__row17593441191615"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="ListResource__p859774121612">key</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p id="ListResource__p2598104151611">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="ListResource__p1659819415167">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p id="ListResource__p55191986252">Key.</p>
|
|
<p id="ListResource__p359894115162">It can contain up to 36 characters. The key cannot be empty. Only digits, letters, hyphens (-), at signs (@), and underscores (_) are allowed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListResource__row959394181617"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="ListResource__p4599241111613">values</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p id="ListResource__p5599641121615">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="ListResource__p3600204114168">Array of strings</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p id="ListResource__p0262171313254">Specifies tag values.</p>
|
|
<p id="ListResource__p186002415167">Each value contains a maximum of 43 Unicode characters and can be an empty string. Only digits, letters, hyphens (-), at signs (@), and underscores (_) are allowed.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="ListResource__section2602144113162"><h4 class="sectiontitle">Response</h4><p id="ListResource__p86028411162"><strong id="ListResource__b2110795964056">Status code: 200</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ListResource__en-us_topic_0000001521382121_en-us_topic_0000001420719636_response_RespTagResourceList" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Body parameters</caption><thead align="left"><tr id="ListResource__row17603174111164"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p id="ListResource__p20605174112165">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.2"><p id="ListResource__p186068415169">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.3.2.4.1.3"><p id="ListResource__p18606114112164">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ListResource__row196031341121613"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="ListResource__p146074418164">resources</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="ListResource__p56081841151615">Array of <a href="#ListResource__en-us_topic_0000001521382121_en-us_topic_0000001420719636_response_Resources">Resources</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="ListResource__p360814118166">Specifies resources.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListResource__row19603741131619"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="ListResource__p1760944117167">errors</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="ListResource__p8610041131620">Array of <a href="#ListResource__en-us_topic_0000001521382121_en-us_topic_0000001420719636_response_Errors">Errors</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="ListResource__p861010414167">Specifies resources of the tag.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListResource__row156049418160"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="ListResource__p861154119161">total_count</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="ListResource__p1961134171616">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="ListResource__p1661219416167">Specifies the total number of resources of the tag.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="ListResource__en-us_topic_0000001521382121_en-us_topic_0000001420719636_response_Resources"></a><a name="en-us_topic_0000001521382121_en-us_topic_0000001420719636_response_Resources"></a><table cellpadding="4" cellspacing="0" summary="" id="ListResource__en-us_topic_0000001521382121_en-us_topic_0000001420719636_response_Resources" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Resources</caption><thead align="left"><tr id="ListResource__row20613144116164"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.1"><p id="ListResource__p206176412166">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.2"><p id="ListResource__p6618154141615">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.4.2.4.1.3"><p id="ListResource__p14618134115168">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ListResource__row10614174111162"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ListResource__p0619841121614">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ListResource__p362013410161">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ListResource__p126201341161612">ProjectID</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListResource__row661413416165"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ListResource__p762194191614">project_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ListResource__p116215414167">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ListResource__p1262214112166">Specifies the project name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListResource__row136144417161"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ListResource__p9623174141619">resource_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ListResource__p15624154115161">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ListResource__p1662413410166">Specifies the resource ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListResource__row96141941191616"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ListResource__p96251141151612">resource_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ListResource__p96252041131617">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ListResource__p2626154151615">Specifies the resource name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListResource__row561513413167"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ListResource__p17627104110168">resource_type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ListResource__p662814414161">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ListResource__p19629124181616">Specifies the resource type.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListResource__row8615174119168"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ListResource__p2630154116169">tags</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ListResource__p1163064141615">Array of <a href="#ListResource__en-us_topic_0000001521382121_en-us_topic_0000001420719636_response_FilterTagResponse">FilterTagResponse</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ListResource__p186311241111611">Specifies the resource tag.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="ListResource__en-us_topic_0000001521382121_en-us_topic_0000001420719636_response_FilterTagResponse"></a><a name="en-us_topic_0000001521382121_en-us_topic_0000001420719636_response_FilterTagResponse"></a><table cellpadding="4" cellspacing="0" summary="" id="ListResource__en-us_topic_0000001521382121_en-us_topic_0000001420719636_response_FilterTagResponse" frame="border" border="1" rules="all"><caption><b>Table 6 </b>FilterTagResponse</caption><thead align="left"><tr id="ListResource__row14632741171617"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.4.1.1"><p id="ListResource__p2633144121610">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.4.1.2"><p id="ListResource__p263334171615">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.5.2.4.1.3"><p id="ListResource__p146349419166">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ListResource__row146321941121617"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.1 "><p id="ListResource__p1634104110162">key</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.2 "><p id="ListResource__p12634941101618">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.5.2.4.1.3 "><p id="ListResource__p144271218152616">Specifies the key.</p>
|
|
<p id="ListResource__p166351041161613">It can contain up to 36 characters. The key cannot be empty. Only digits, letters, hyphens (-), at signs (@), and underscores (_) are allowed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListResource__row186326412162"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.1 "><p id="ListResource__p2063510419163">value</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.2 "><p id="ListResource__p1363624118167">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.5.2.4.1.3 "><p id="ListResource__p1466362210262">Specifies the value.</p>
|
|
<p id="ListResource__p20636154116166">Each value contains a maximum of 43 Unicode characters and can be an empty string. Only digits, letters, hyphens (-), at signs (@), and underscores (_) are allowed.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="ListResource__en-us_topic_0000001521382121_en-us_topic_0000001420719636_response_Errors"></a><a name="en-us_topic_0000001521382121_en-us_topic_0000001420719636_response_Errors"></a><table cellpadding="4" cellspacing="0" summary="" id="ListResource__en-us_topic_0000001521382121_en-us_topic_0000001420719636_response_Errors" frame="border" border="1" rules="all"><caption><b>Table 7 </b>Errors</caption><thead align="left"><tr id="ListResource__row36371741121610"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.6.2.4.1.1"><p id="ListResource__p176386414164">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.6.2.4.1.2"><p id="ListResource__p8639104116169">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.6.2.4.1.3"><p id="ListResource__p19639941201617">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ListResource__row1663744181616"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.1 "><p id="ListResource__p4639194141617">error_code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.2 "><p id="ListResource__p364010414164">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.6.2.4.1.3 "><p id="ListResource__p164014417165">Specifies the error code.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListResource__row16637184151615"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.1 "><p id="ListResource__p1664114117164">error_msg</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.2 "><p id="ListResource__p1564114118169">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.6.2.4.1.3 "><p id="ListResource__p964219418166">Specifies the error.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListResource__row1463754151618"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.1 "><p id="ListResource__p126431141171613">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.2 "><p id="ListResource__p166447411163">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.6.2.4.1.3 "><p id="ListResource__p2644114118166">ProjectID</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListResource__row126371141161616"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.1 "><p id="ListResource__p1645841121610">resource_type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.2 "><p id="ListResource__p9645941121615">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.6.2.4.1.3 "><p id="ListResource__p20646124118161">Specifies the resource type.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="ListResource__section161219454162"><h4 class="sectiontitle">Example Request</h4><p id="ListResource__p612745191620">Filtering resources by tag</p>
|
|
<pre class="screen" id="ListResource__screen1812245151610">POST https://v1.0/resource-instances/filter
|
|
|
|
{
|
|
"project_id" : "e1eb7c40cbeaxxxxxxcde527594a306d",
|
|
"resource_types" : [ "disk", "ecs" ],
|
|
"tags" : [ {
|
|
"key" : "env",
|
|
"values" : [ "dev", "prod" ]
|
|
}, {
|
|
"key" : "test",
|
|
"values" : [ "test" ]
|
|
} ],
|
|
|
|
"without_any_tag" : true,
|
|
"offset" : 0,
|
|
"limit" : 10
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="ListResource__section5141545101611"><h4 class="sectiontitle">Example Response</h4><p id="ListResource__p414194510168"><strong id="ListResource__b20529407094056">Status code: 200</strong></p>
|
|
<p id="ListResource__p131412456166">Successful operation</p>
|
|
<pre class="screen" id="ListResource__screen1714134541612">{
|
|
"resources" : [ {
|
|
"project_id" : "e1eb7c40cbeaxxxxxxde527594a306d",
|
|
"project_name" : "XXXX",
|
|
"resource_type" : "disk",
|
|
"resource_id" : "b621f5ae-xxxx-xxxx-xxxx-752c445434b4",
|
|
"resource_name" : "xxx1-volume-0001",
|
|
"tags" : [ {
|
|
"key" : "ENV",
|
|
"value" : "dev"
|
|
} ]
|
|
}, {
|
|
"project_id" : "e1eb7c40cbxxxxxx89cde527594a306d",
|
|
"project_name" : "XXXX",
|
|
"resource_type" : "disk",
|
|
"resource_id" : "87c9edc9-xxxx-xxxx-xxxx-372b2e22d579",
|
|
"resource_name" : "xxx2-volume-0002",
|
|
"tags" : [ {
|
|
"key" : "test",
|
|
"value" : "test"
|
|
} ]
|
|
} ],
|
|
"errors" : [],
|
|
"total_count" : 2
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="ListResource__section17789101582315"><h4 class="sectiontitle">Status Codes</h4><p id="ListResource__p145228330242">See <a href="en-us_topic_0130578970.html">Status Codes</a>.</p>
|
|
</div>
|
|
<div class="section" id="ListResource__section18604165622519"><h4 class="sectiontitle">Error Codes</h4><p id="ListResource__p177044331253">See <a href="en-us_topic_0057939857.html">Error Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="topic_300000003.html">Resource Tags</a></div>
|
|
</div>
|
|
</div>
|
|
|