doc-exports/docs/smn/api-ref/smn_api_56001.html
guoyanyan feae604f17 SMN API 20220929 v1
Reviewed-by: gtema <artem.goncharov@gmail.com>
Co-authored-by: guoyanyan <guoyanyan3@huawei.com>
Co-committed-by: guoyanyan <guoyanyan3@huawei.com>
2022-11-10 09:15:21 +00:00

425 lines
32 KiB
HTML

<a name="smn_api_56001"></a><a name="smn_api_56001"></a>
<h1 class="topictitle1">Querying Resources by Tag</h1>
<div id="body1523350913840"><div class="section" id="smn_api_56001__section34083598194741"><h4 class="sectiontitle">Description</h4><ul id="smn_api_56001__ul33304380203733"><li id="smn_api_56001__li51147505203733">API name<p id="smn_api_56001__p38624841203741">GetResourceInstances</p>
</li></ul>
<ul id="smn_api_56001__ul20998054203745"><li id="smn_api_56001__li46884910203750">Function<p id="smn_api_56001__p15906587714">Query SMN resources by tag.</p>
</li></ul>
</div>
<div class="section" id="smn_api_56001__section16663308194741"><h4 class="sectiontitle">URI</h4><ul id="smn_api_56001__ul7550747194741"><li id="smn_api_56001__li847867194741">URI format<p id="smn_api_56001__p788919441774">POST /v2/{project_id}/{resource_type}/resource_instances/action</p>
</li></ul>
<ul id="smn_api_56001__ul1568365194741"><li id="smn_api_56001__li14115291194741">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="smn_api_56001__table692210424914" frame="border" border="1" rules="all"><thead align="left"><tr id="smn_api_56001__row199531142096"><th align="left" class="cellrowborder" valign="top" width="21.84%" id="mcps1.3.2.3.1.1.1.5.1.1"><p id="smn_api_56001__p18953142091"><strong id="smn_api_56001__b842352706191030">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="26.44%" id="mcps1.3.2.3.1.1.1.5.1.2"><p id="smn_api_56001__p189530421394"><strong id="smn_api_56001__b593421527191713">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.24%" id="mcps1.3.2.3.1.1.1.5.1.3"><p id="smn_api_56001__p129538421390"><strong id="smn_api_56001__b84235270619112">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="34.48%" id="mcps1.3.2.3.1.1.1.5.1.4"><p id="smn_api_56001__p9953194213916"><strong id="smn_api_56001__b84235270619115">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="smn_api_56001__row129533421894"><td class="cellrowborder" valign="top" width="21.84%" headers="mcps1.3.2.3.1.1.1.5.1.1 "><p id="smn_api_56001__p15953144211913">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="26.44%" headers="mcps1.3.2.3.1.1.1.5.1.2 "><p id="smn_api_56001__p59531421199">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17.24%" headers="mcps1.3.2.3.1.1.1.5.1.3 "><p id="smn_api_56001__p1095317425913">String</p>
</td>
<td class="cellrowborder" valign="top" width="34.48%" headers="mcps1.3.2.3.1.1.1.5.1.4 "><p id="smn_api_56001__p995315422920">Project ID</p>
<p id="smn_api_56001__p118812918506">See <a href="smn_api_66000.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
<tr id="smn_api_56001__row99537424915"><td class="cellrowborder" valign="top" width="21.84%" headers="mcps1.3.2.3.1.1.1.5.1.1 "><p id="smn_api_56001__p99531421797">resource_type</p>
</td>
<td class="cellrowborder" valign="top" width="26.44%" headers="mcps1.3.2.3.1.1.1.5.1.2 "><p id="smn_api_56001__p1495310421799">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17.24%" headers="mcps1.3.2.3.1.1.1.5.1.3 "><p id="smn_api_56001__p149531342296">String</p>
</td>
<td class="cellrowborder" valign="top" width="34.48%" headers="mcps1.3.2.3.1.1.1.5.1.4 "><p id="smn_api_56001__p52661238184213">Resource type</p>
<p id="smn_api_56001__p16612591087">The value can be the following:</p>
<p id="smn_api_56001__p14550953686"><strong id="smn_api_56001__b8638141823218">smn_topic</strong>: topic</p>
<p id="smn_api_56001__p8682201993"></p>
<p id="smn_api_56001__p278251314214"></p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="smn_api_56001__section1142871194741"><h4 class="sectiontitle">Request</h4><ul id="smn_api_56001__ul25463739194741"><li id="smn_api_56001__li27847059194741">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="smn_api_56001__table163121742121118" frame="border" border="1" rules="all"><thead align="left"><tr id="smn_api_56001__row154221042181113"><th align="left" class="cellrowborder" valign="top" width="16.87168716871687%" id="mcps1.3.3.2.1.1.1.5.1.1"><p id="smn_api_56001__p1442284241113"><strong id="smn_api_56001__b463974686">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="22.562256225622562%" id="mcps1.3.3.2.1.1.1.5.1.2"><p id="smn_api_56001__p184221942111116"><strong id="smn_api_56001__b379454164">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="23.94239423942394%" id="mcps1.3.3.2.1.1.1.5.1.3"><p id="smn_api_56001__p11422242101116"><strong id="smn_api_56001__b1730330645">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="36.62366236623662%" id="mcps1.3.3.2.1.1.1.5.1.4"><p id="smn_api_56001__p172161339171313"><strong id="smn_api_56001__b2020663370">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="smn_api_56001__row144221542181111"><td class="cellrowborder" valign="top" width="16.87168716871687%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="smn_api_56001__p164228426114">tags</p>
</td>
<td class="cellrowborder" valign="top" width="22.562256225622562%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="smn_api_56001__p4422542161112">No</p>
</td>
<td class="cellrowborder" valign="top" width="23.94239423942394%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="smn_api_56001__p13422124291118">Tags structure array</p>
</td>
<td class="cellrowborder" valign="top" width="36.62366236623662%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="smn_api_56001__p132727111254">Includes specified tags. For details, see <a href="#smn_api_56001__table12385184281216">Table 1</a>.</p>
<div class="note" id="smn_api_56001__note156841029125418"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="smn_api_56001__p86841296546">The structure body is mandatory. A maximum of 10 tag keys are allowed in each query operation. The tag key cannot be left blank or set to the empty string. Each tag key can have up to 10 tag values. Each tag key and tag values of one key must be unique. Resources identified by different keys are in AND relationship.</p>
</div></div>
</td>
</tr>
<tr id="smn_api_56001__row17422114231115"><td class="cellrowborder" valign="top" width="16.87168716871687%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="smn_api_56001__p74221442111112">tags_any</p>
</td>
<td class="cellrowborder" valign="top" width="22.562256225622562%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="smn_api_56001__p10422942171111">No</p>
</td>
<td class="cellrowborder" valign="top" width="23.94239423942394%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="smn_api_56001__p204221142151112">Tags structure array</p>
</td>
<td class="cellrowborder" valign="top" width="36.62366236623662%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="smn_api_56001__p11216103951310">Includes any of the specified tags. For details, see <a href="#smn_api_56001__table12385184281216">Table 1</a>.</p>
<div class="note" id="smn_api_56001__note431014399542"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="smn_api_56001__p6310203955413">The structure body is mandatory. A maximum of 10 tag keys are allowed in each query operation. The tag key cannot be left blank or set to the empty string. Each tag key can have up to 10 tag values. Each tag key and tag values of one key must be unique. Resources identified by different keys are in OR relationship.</p>
</div></div>
</td>
</tr>
<tr id="smn_api_56001__row13422164220114"><td class="cellrowborder" valign="top" width="16.87168716871687%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="smn_api_56001__p11422174261116">not_tags</p>
</td>
<td class="cellrowborder" valign="top" width="22.562256225622562%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="smn_api_56001__p20422442141118">No</p>
</td>
<td class="cellrowborder" valign="top" width="23.94239423942394%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="smn_api_56001__p1866963145215">Tags structure array</p>
</td>
<td class="cellrowborder" valign="top" width="36.62366236623662%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="smn_api_56001__p82165399139">Excludes specified tags. For details, see <a href="#smn_api_56001__table12385184281216">Table 1</a>.</p>
<div class="note" id="smn_api_56001__note2715124713543"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="smn_api_56001__p6715184718544">The structure body is mandatory. A maximum of 10 tag keys are allowed in each query operation. The tag key cannot be left blank or set to the empty string. Each tag key can have up to 10 tag values. Each tag key and tag values of one key must be unique. Resources identified by different keys are in NAND relationship.</p>
</div></div>
</td>
</tr>
<tr id="smn_api_56001__row0422194219118"><td class="cellrowborder" valign="top" width="16.87168716871687%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="smn_api_56001__p9422042101110">not_tags_any</p>
</td>
<td class="cellrowborder" valign="top" width="22.562256225622562%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="smn_api_56001__p1342216420115">No</p>
</td>
<td class="cellrowborder" valign="top" width="23.94239423942394%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="smn_api_56001__p64221742121116">Tags structure array</p>
</td>
<td class="cellrowborder" valign="top" width="36.62366236623662%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="smn_api_56001__p12160393138">Excludes any of the specified tags. For details, see <a href="#smn_api_56001__table12385184281216">Table 1</a>.</p>
<div class="note" id="smn_api_56001__note121691756185412"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="smn_api_56001__p1493371445514">The structure body is mandatory. A maximum of 10 tag keys are allowed in each query operation. The tag key cannot be left blank or set to the empty string. Each tag key can have up to 10 tag values. Each tag key and tag values of one key must be unique. Resources identified by different keys are in NOR relationship.</p>
</div></div>
</td>
</tr>
<tr id="smn_api_56001__row15422042151113"><td class="cellrowborder" valign="top" width="16.87168716871687%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="smn_api_56001__p174221442151111">limit</p>
</td>
<td class="cellrowborder" valign="top" width="22.562256225622562%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="smn_api_56001__p342213429119">No</p>
</td>
<td class="cellrowborder" valign="top" width="23.94239423942394%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="smn_api_56001__p8422442161119">String</p>
</td>
<td class="cellrowborder" valign="top" width="36.62366236623662%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="smn_api_56001__p5699151414544">Maximum number of resources to be queried</p>
<ul id="smn_api_56001__ul2162893714"><li id="smn_api_56001__li014718231379">If <strong id="smn_api_56001__b842352706152943">action</strong> is set to <strong id="smn_api_56001__b842352706152951">count</strong>, this parameter does not take effect.</li><li id="smn_api_56001__li1616212917710">If <strong id="smn_api_56001__b84235270692122">action</strong> is set to <strong id="smn_api_56001__b84235270692134">filter</strong>, this parameter takes effect. Its value ranges from 1 to 1000 (default).</li></ul>
</td>
</tr>
<tr id="smn_api_56001__row5422142171118"><td class="cellrowborder" valign="top" width="16.87168716871687%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="smn_api_56001__p8437842141117">offset</p>
</td>
<td class="cellrowborder" valign="top" width="22.562256225622562%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="smn_api_56001__p9437174281113">No</p>
</td>
<td class="cellrowborder" valign="top" width="23.94239423942394%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="smn_api_56001__p1343724215117">String</p>
</td>
<td class="cellrowborder" valign="top" width="36.62366236623662%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="smn_api_56001__p138117139135">Start location of pagination query. The query starts from the next resource of the specified location. You do not need to specify this parameter when querying resources on the first page. When you query resources on subsequent pages, set this parameter to the location returned in the response body for the previous query.</p>
<ul id="smn_api_56001__ul1279161261617"><li id="smn_api_56001__li9397920161316">If <strong id="smn_api_56001__b1088205526">action</strong> is set to <strong id="smn_api_56001__b1514275001">count</strong>, this parameter does not take effect.</li><li id="smn_api_56001__li92797127168">If <strong id="smn_api_56001__b84235270692726">action</strong> is set to <strong id="smn_api_56001__b84235270692731">filter</strong>, this parameter takes effect. Its value can be 0 (default) or a positive integer.</li></ul>
</td>
</tr>
<tr id="smn_api_56001__row54371642161115"><td class="cellrowborder" valign="top" width="16.87168716871687%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="smn_api_56001__p4437164210116">action</p>
</td>
<td class="cellrowborder" valign="top" width="22.562256225622562%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="smn_api_56001__p44377426118">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="23.94239423942394%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="smn_api_56001__p10437742171119">String</p>
</td>
<td class="cellrowborder" valign="top" width="36.62366236623662%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="smn_api_56001__p277291081511">Operation to be performed. The value can be <strong id="smn_api_56001__b84235270616546">filter</strong> or <strong id="smn_api_56001__b84235270616552">count</strong> (case-sensitive).</p>
<p id="smn_api_56001__p1061044516952"><strong id="smn_api_56001__b1749576416952">filter</strong>: queries resources in pages based on filter conditions.</p>
<p id="smn_api_56001__p4081382911230"><strong id="smn_api_56001__b84235270620460">count</strong>: queries the total number of resources meeting filter conditions.</p>
</td>
</tr>
<tr id="smn_api_56001__row543716422116"><td class="cellrowborder" valign="top" width="16.87168716871687%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="smn_api_56001__p13437164216113">matches</p>
</td>
<td class="cellrowborder" valign="top" width="22.562256225622562%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="smn_api_56001__p14437184241113">No</p>
</td>
<td class="cellrowborder" valign="top" width="23.94239423942394%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="smn_api_56001__p11437114217112">Match condition structure array</p>
</td>
<td class="cellrowborder" valign="top" width="36.62366236623662%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="smn_api_56001__p2991175121517">Key-value pair to be matched</p>
<p id="smn_api_56001__p8184185775619">The key can only be <strong id="smn_api_56001__b842352706161550">resource_name</strong>.</p>
<p id="smn_api_56001__p11842575562">The value will be exactly matched.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="smn_api_56001__table12385184281216"></a><a name="table12385184281216"></a><table cellpadding="4" cellspacing="0" summary="" id="smn_api_56001__table12385184281216" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Tags structure</caption><thead align="left"><tr id="smn_api_56001__row12526442141213"><th align="left" class="cellrowborder" valign="top" width="18.16%" id="mcps1.3.3.2.1.2.2.6.1.1"><p id="smn_api_56001__p1252612428129"><strong id="smn_api_56001__b47901755163415">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="12.030000000000001%" id="mcps1.3.3.2.1.2.2.6.1.2"><p id="smn_api_56001__p852612421125"><strong id="smn_api_56001__b895256445">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.81%" id="mcps1.3.3.2.1.2.2.6.1.3"><p id="smn_api_56001__p14526542121214"><strong id="smn_api_56001__b2041287441">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.65%" id="mcps1.3.3.2.1.2.2.6.1.4"><p id="smn_api_56001__p17526124281215"><strong id="smn_api_56001__b63411457103415">Description</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="34.35%" id="mcps1.3.3.2.1.2.2.6.1.5"><p id="smn_api_56001__p12294162622414"><strong id="smn_api_56001__b167841358163418">Constraint</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="smn_api_56001__row1526194218129"><td class="cellrowborder" valign="top" width="18.16%" headers="mcps1.3.3.2.1.2.2.6.1.1 "><p id="smn_api_56001__p65262427126">key</p>
</td>
<td class="cellrowborder" valign="top" width="12.030000000000001%" headers="mcps1.3.3.2.1.2.2.6.1.2 "><p id="smn_api_56001__p4526154211123">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="16.81%" headers="mcps1.3.3.2.1.2.2.6.1.3 "><p id="smn_api_56001__p35261242171216">String</p>
</td>
<td class="cellrowborder" valign="top" width="18.65%" headers="mcps1.3.3.2.1.2.2.6.1.4 "><p id="smn_api_56001__p552604213129">Tag key</p>
</td>
<td class="cellrowborder" valign="top" width="34.35%" headers="mcps1.3.3.2.1.2.2.6.1.5 "><p id="smn_api_56001__p6294172612244">A key contains 127 Unicode characters and cannot be blank.</p>
</td>
</tr>
<tr id="smn_api_56001__row55261142141216"><td class="cellrowborder" valign="top" width="18.16%" headers="mcps1.3.3.2.1.2.2.6.1.1 "><p id="smn_api_56001__p1852614219127">values</p>
</td>
<td class="cellrowborder" valign="top" width="12.030000000000001%" headers="mcps1.3.3.2.1.2.2.6.1.2 "><p id="smn_api_56001__p11526104271211">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="16.81%" headers="mcps1.3.3.2.1.2.2.6.1.3 "><p id="smn_api_56001__p45262426129">String list</p>
</td>
<td class="cellrowborder" valign="top" width="18.65%" headers="mcps1.3.3.2.1.2.2.6.1.4 "><p id="smn_api_56001__p152694220126">Value list</p>
</td>
<td class="cellrowborder" valign="top" width="34.35%" headers="mcps1.3.3.2.1.2.2.6.1.5 "><p id="smn_api_56001__p18294152612244">Each value contains a maximum of 255 Unicode characters. If the value starts with an asterisk (*), the character string following the asterisk is fuzzy-matched. The <strong id="smn_api_56001__b18353175912112">values</strong> field cannot be missing, but can be an empty list. If it is empty, any value will be matched. The values are in OR relationship.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="smn_api_56001__li1873356132">Request example<pre class="screen" id="smn_api_56001__screen5698195161310">POST https://{SMN_Endpoint}/v2/{project_id}/{resource_type}/resource_instances/action</pre>
<ul id="smn_api_56001__ul863811274512"><li id="smn_api_56001__li1118214961317">Request body when <strong id="smn_api_56001__b8423527069451">action</strong> is set to <strong id="smn_api_56001__b84235270694459">filter</strong><pre class="screen" id="smn_api_56001__screen6135153201618">{
"offset": "100",
"limit": "100",
"action": "filter",
"matches":[
{
"key": "resource_name",
"value": "resource1"
}
],
"not_tags": [
{
"key": "key1",
"values": ["*value1","value2"]
},
{
"key": "key2",
"values": ["*value21","value22"]
}
],
"tags": [
{
"key": "key1",
"values": ["*value1","value2"]
}
],
"tags_any": [
{
"key": "key1",
"values": ["value1", "value2"]
}
],
"not_tags_any": [
{
"key": "key1",
"values": ["value1", "value2"]
}
]
}</pre>
</li><li id="smn_api_56001__li1544895220157">Request body when <strong id="smn_api_56001__b1434182751">action</strong> is set to <strong id="smn_api_56001__b1264910259">count</strong><pre class="screen" id="smn_api_56001__screen1214633101620">{
"action": "count",
"not_tags": [
{
"key": "key1",
"values": ["value1", "*value2"]
}
],
"tags": [
{
"key": "key1",
"values": ["value1", "value2"]
}
],
"tags_any": [
{
"key": "key1",
"values": [ "value1", "value2"]
}
],
"not_tags_any": [
{
"key": "key1",
"values": ["value1", "value2"]
}
],
"matches":[
{
"key": "resource_name",
"value": "resouurce"
}
]
}</pre>
</li></ul>
</li></ul>
</div>
<div class="section" id="smn_api_56001__section13775125191714"><h4 class="sectiontitle">Response</h4><ul id="smn_api_56001__ul19931151171720"><li id="smn_api_56001__li89311451181715">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="smn_api_56001__table479165191720" frame="border" border="1" rules="all"><thead align="left"><tr id="smn_api_56001__row17931135116172"><th align="left" class="cellrowborder" valign="top" width="20.65%" id="mcps1.3.4.2.1.1.1.5.1.1"><p id="smn_api_56001__p15931551181711"><strong id="smn_api_56001__b553634246">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.57%" id="mcps1.3.4.2.1.1.1.5.1.2"><p id="smn_api_56001__p8931185119173"><strong id="smn_api_56001__b305302294">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="27.169999999999998%" id="mcps1.3.4.2.1.1.1.5.1.3"><p id="smn_api_56001__p1293118514171"><strong id="smn_api_56001__b1528776683">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="32.61%" id="mcps1.3.4.2.1.1.1.5.1.4"><p id="smn_api_56001__p1493155131717"><strong id="smn_api_56001__b255500611">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="smn_api_56001__row189311551101713"><td class="cellrowborder" valign="top" width="20.65%" headers="mcps1.3.4.2.1.1.1.5.1.1 "><p id="smn_api_56001__p093165181714">resources</p>
</td>
<td class="cellrowborder" valign="top" width="19.57%" headers="mcps1.3.4.2.1.1.1.5.1.2 "><p id="smn_api_56001__p11931145115176">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="27.169999999999998%" headers="mcps1.3.4.2.1.1.1.5.1.3 "><p id="smn_api_56001__p19931165111175">Resource structure array</p>
</td>
<td class="cellrowborder" valign="top" width="32.61%" headers="mcps1.3.4.2.1.1.1.5.1.4 "><p id="smn_api_56001__p0482182011216">For details, see <a href="#smn_api_56001__table97917514177">Table 2</a>.</p>
</td>
</tr>
<tr id="smn_api_56001__row1393115111174"><td class="cellrowborder" valign="top" width="20.65%" headers="mcps1.3.4.2.1.1.1.5.1.1 "><p id="smn_api_56001__p9931195191717">total_count</p>
</td>
<td class="cellrowborder" valign="top" width="19.57%" headers="mcps1.3.4.2.1.1.1.5.1.2 "><p id="smn_api_56001__p14931651161717">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="27.169999999999998%" headers="mcps1.3.4.2.1.1.1.5.1.3 "><p id="smn_api_56001__p89313512179">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="32.61%" headers="mcps1.3.4.2.1.1.1.5.1.4 "><p id="smn_api_56001__p7931251111720">Total number of resources</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="smn_api_56001__table97917514177"></a><a name="table97917514177"></a><table cellpadding="4" cellspacing="0" summary="" id="smn_api_56001__table97917514177" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Resource structure</caption><thead align="left"><tr id="smn_api_56001__row20931851161717"><th align="left" class="cellrowborder" valign="top" width="19.73%" id="mcps1.3.4.2.1.2.2.5.1.1"><p id="smn_api_56001__p169312051161713"><strong id="smn_api_56001__b520919401466">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.59%" id="mcps1.3.4.2.1.2.2.5.1.2"><p id="smn_api_56001__p6931195111719"><strong id="smn_api_56001__b1593427990">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="28.53%" id="mcps1.3.4.2.1.2.2.5.1.3"><p id="smn_api_56001__p093195116179"><strong id="smn_api_56001__b419849882">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="32.15%" id="mcps1.3.4.2.1.2.2.5.1.4"><p id="smn_api_56001__p59319515179"><strong id="smn_api_56001__b13369124134610">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="smn_api_56001__row393195119172"><td class="cellrowborder" valign="top" width="19.73%" headers="mcps1.3.4.2.1.2.2.5.1.1 "><p id="smn_api_56001__p1793165110171">resource_id</p>
</td>
<td class="cellrowborder" valign="top" width="19.59%" headers="mcps1.3.4.2.1.2.2.5.1.2 "><p id="smn_api_56001__p6931185117179">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="28.53%" headers="mcps1.3.4.2.1.2.2.5.1.3 "><p id="smn_api_56001__p69311951191710">String</p>
</td>
<td class="cellrowborder" valign="top" width="32.15%" headers="mcps1.3.4.2.1.2.2.5.1.4 "><p id="smn_api_56001__p1931175111170">Resource ID</p>
</td>
</tr>
<tr id="smn_api_56001__row493125112176"><td class="cellrowborder" valign="top" width="19.73%" headers="mcps1.3.4.2.1.2.2.5.1.1 "><p id="smn_api_56001__p2931165110176">resource_detail</p>
</td>
<td class="cellrowborder" valign="top" width="19.59%" headers="mcps1.3.4.2.1.2.2.5.1.2 "><p id="smn_api_56001__p6931105151716">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="28.53%" headers="mcps1.3.4.2.1.2.2.5.1.3 "><p id="smn_api_56001__p293145151713">Object</p>
</td>
<td class="cellrowborder" valign="top" width="32.15%" headers="mcps1.3.4.2.1.2.2.5.1.4 "><p id="smn_api_56001__p1793113514176">Resource details. Resource object used for extension. The value is left blank by default.</p>
<p id="smn_api_56001__p826215381712">For topic resources, the value of this field is <strong id="smn_api_56001__b842352706143216">{"topic_urn":"${TopicUrn}","display_name":"display name"}</strong>.</p>
<p id="smn_api_56001__p1226217381177">For other resources, the value is <strong id="smn_api_56001__b82963378259">null</strong>.</p>
</td>
</tr>
<tr id="smn_api_56001__row8931195121716"><td class="cellrowborder" valign="top" width="19.73%" headers="mcps1.3.4.2.1.2.2.5.1.1 "><p id="smn_api_56001__p29311851181715">tags</p>
</td>
<td class="cellrowborder" valign="top" width="19.59%" headers="mcps1.3.4.2.1.2.2.5.1.2 "><p id="smn_api_56001__p10931155119177">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="28.53%" headers="mcps1.3.4.2.1.2.2.5.1.3 "><p id="smn_api_56001__p69311851201711">Resource_tag structure array</p>
</td>
<td class="cellrowborder" valign="top" width="32.15%" headers="mcps1.3.4.2.1.2.2.5.1.4 "><p id="smn_api_56001__p20931135117174">List of queried tags. If no tag is matched, an empty array is returned. For details, see <a href="#smn_api_56001__table178221351151717">Table 3</a>.</p>
</td>
</tr>
<tr id="smn_api_56001__row493125112175"><td class="cellrowborder" valign="top" width="19.73%" headers="mcps1.3.4.2.1.2.2.5.1.1 "><p id="smn_api_56001__p9931135131716">resource_name</p>
</td>
<td class="cellrowborder" valign="top" width="19.59%" headers="mcps1.3.4.2.1.2.2.5.1.2 "><p id="smn_api_56001__p29311512174">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="28.53%" headers="mcps1.3.4.2.1.2.2.5.1.3 "><p id="smn_api_56001__p99312519176">String</p>
</td>
<td class="cellrowborder" valign="top" width="32.15%" headers="mcps1.3.4.2.1.2.2.5.1.4 "><p id="smn_api_56001__p893175191714">Resource name</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="smn_api_56001__table178221351151717"></a><a name="table178221351151717"></a><table cellpadding="4" cellspacing="0" summary="" id="smn_api_56001__table178221351151717" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Resource_tag structure</caption><thead align="left"><tr id="smn_api_56001__row139311651171713"><th align="left" class="cellrowborder" valign="top" width="18.81188118811881%" id="mcps1.3.4.2.1.3.2.6.1.1"><p id="smn_api_56001__p993135161718"><strong id="smn_api_56001__b6377153915111">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.841584158415841%" id="mcps1.3.4.2.1.3.2.6.1.2"><p id="smn_api_56001__p19311451131719"><strong id="smn_api_56001__b553769561">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.841584158415841%" id="mcps1.3.4.2.1.3.2.6.1.3"><p id="smn_api_56001__p13931451141710"><strong id="smn_api_56001__b1343797695">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="12.871287128712872%" id="mcps1.3.4.2.1.3.2.6.1.4"><p id="smn_api_56001__p393125141712"><strong id="smn_api_56001__b36311841175120">Description</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="36.633663366336634%" id="mcps1.3.4.2.1.3.2.6.1.5"><p id="smn_api_56001__p1715443212610"><strong id="smn_api_56001__b134437429517">Constraint</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="smn_api_56001__row3931105113173"><td class="cellrowborder" valign="top" width="18.81188118811881%" headers="mcps1.3.4.2.1.3.2.6.1.1 "><p id="smn_api_56001__p17931145131711">key</p>
</td>
<td class="cellrowborder" valign="top" width="15.841584158415841%" headers="mcps1.3.4.2.1.3.2.6.1.2 "><p id="smn_api_56001__p9931145120179">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="15.841584158415841%" headers="mcps1.3.4.2.1.3.2.6.1.3 "><p id="smn_api_56001__p16931751111714">String</p>
</td>
<td class="cellrowborder" valign="top" width="12.871287128712872%" headers="mcps1.3.4.2.1.3.2.6.1.4 "><p id="smn_api_56001__p393175116171">Tag key</p>
</td>
<td class="cellrowborder" valign="top" width="36.633663366336634%" headers="mcps1.3.4.2.1.3.2.6.1.5 "><p id="smn_api_56001__p171314419267">The key contains 36 Unicode characters at most and cannot be blank or an empty string. It can contain only digits, letters, hyphens (-), and underscores (_) and must not start or end with a space.</p>
</td>
</tr>
<tr id="smn_api_56001__row39312515173"><td class="cellrowborder" valign="top" width="18.81188118811881%" headers="mcps1.3.4.2.1.3.2.6.1.1 "><p id="smn_api_56001__p09311651171711">value</p>
</td>
<td class="cellrowborder" valign="top" width="15.841584158415841%" headers="mcps1.3.4.2.1.3.2.6.1.2 "><p id="smn_api_56001__p1693155113179">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="15.841584158415841%" headers="mcps1.3.4.2.1.3.2.6.1.3 "><p id="smn_api_56001__p14931751141720">String</p>
</td>
<td class="cellrowborder" valign="top" width="12.871287128712872%" headers="mcps1.3.4.2.1.3.2.6.1.4 "><p id="smn_api_56001__p159313515179">Tag value</p>
</td>
<td class="cellrowborder" valign="top" width="36.633663366336634%" headers="mcps1.3.4.2.1.3.2.6.1.5 "><p id="smn_api_56001__p344164632615">Each value contains 43 Unicode characters at most and can be an empty string. It can contain only digits, letters, hyphens (-), and underscores (_) and must not start or end with a space.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="smn_api_56001__ul8931651101717"><li id="smn_api_56001__li29312513174">Response example<p id="smn_api_56001__p293117515178">Response body when <strong id="smn_api_56001__b8423527069924">action</strong> is set to <strong id="smn_api_56001__b8423527069921">filter</strong></p>
<pre class="screen" id="smn_api_56001__screen1393117519172">{
"resources": [
{
"resource_detail": {
"topic_urn":"urn:smn:regionId:f96188c7ccaf4ffba0c9aa149ab2bd57:resouece1",
"display_name":"testtest"
},
"resource_id": "cffe4fc4c9a54219b60dbaf7b586e132",
"resource_name": "resouece1",
"tags": [
{
"key": "key1",
"value": "value1"
}
]
}
],
"total_count": 1000
}</pre>
<p id="smn_api_56001__p19947125121719">Response body when <strong id="smn_api_56001__b171630997">action</strong> is set to <strong id="smn_api_56001__b718401134">count</strong></p>
<pre class="screen" id="smn_api_56001__screen59473514173">{
"total_count": 1000
}</pre>
</li></ul>
</div>
<div class="section" id="smn_api_56001__section104011733101818"><h4 class="sectiontitle">Returned Value</h4><p id="smn_api_56001__p144041524121813">See section <a href="smn_api_63002.html">Returned Value</a>.</p>
</div>
<div class="section" id="smn_api_56001__section73211020122511"><h4 class="sectiontitle">Error Code</h4><p id="smn_api_56001__p9759142919265">See section <a href="smn_api_64000.html">Error Code</a>.</p>
</div>
<p id="smn_api_56001__p8060118"></p>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="smn_api_56000.html">Resource Tag Operations</a></div>
</div>
</div>