doc-exports/docs/dns/api-ref/dns_api_67006.html
Qin Ying, Fan cf1007c84e DNS API 20240223 version
Reviewed-by: Hajba, László Antal <laszlo-antal.hajba@t-systems.com>
Co-authored-by: Qin Ying, Fan <fanqinying@huawei.com>
Co-committed-by: Qin Ying, Fan <fanqinying@huawei.com>
2024-05-16 13:48:49 +00:00

445 lines
35 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<a name="dns_api_67006"></a><a name="dns_api_67006"></a>
<h1 class="topictitle1">Querying Resources by Tag</h1>
<div id="body1536144195639"><div class="section" id="dns_api_67006__scc94830eea9a47fa9c81380d5748b11b"><h4 class="sectiontitle">Function</h4><p id="dns_api_67006__en-us_topic_0123490185_p782982518031">Query DNS resources by tag.</p>
<p id="dns_api_67006__ab364821bebaf4525b4f7a3c33788a975">Resources are sorted by creation time in descending order.</p>
</div>
<div class="section" id="dns_api_67006__sbb832340100d47c5b826259ab61954a9"><h4 class="sectiontitle">URI</h4><p id="dns_api_67006__acfa39d8a27c84408aab7a79ea33dd537">POST /v2/{project_id}/{resource_type}/resource_instances/action</p>
<div class="p" id="dns_api_67006__p893762812502">For details, see <a href="#dns_api_67006__ta232abacc5c94e828ce60c58a8982bee">Table 1</a>.
<div class="tablenoborder"><a name="dns_api_67006__ta232abacc5c94e828ce60c58a8982bee"></a><a name="ta232abacc5c94e828ce60c58a8982bee"></a><table cellpadding="4" cellspacing="0" summary="" id="dns_api_67006__ta232abacc5c94e828ce60c58a8982bee" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameters in the URI</caption><thead align="left"><tr id="dns_api_67006__r4414011e2d0f47f99d4a85508602edc6"><th align="left" class="cellrowborder" valign="top" width="22.64%" id="mcps1.3.2.3.2.2.5.1.1"><p id="dns_api_67006__a27f14d476f204411830ab21a16fd20d8"><strong id="dns_api_67006__b560318403919">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.37%" id="mcps1.3.2.3.2.2.5.1.2"><p id="dns_api_67006__a6687030089db4cd887e398798fd31df4"><strong id="dns_api_67006__b66031740394">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.349999999999998%" id="mcps1.3.2.3.2.2.5.1.3"><p id="dns_api_67006__aa7d84d0067f6473bb09dd153ef5125f9"><strong id="dns_api_67006__b11604140495">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="42.64%" id="mcps1.3.2.3.2.2.5.1.4"><p id="dns_api_67006__a4b5b9c81830d44c0ad4c491efc147701"><strong id="dns_api_67006__b460424018912">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="dns_api_67006__r87f3b0e3d5e34645a6a72c8295a60dd1"><td class="cellrowborder" valign="top" width="22.64%" headers="mcps1.3.2.3.2.2.5.1.1 "><p id="dns_api_67006__a02bd4a996c2247aaaf70785d641ea99b">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="17.37%" headers="mcps1.3.2.3.2.2.5.1.2 "><p id="dns_api_67006__a36e39cee57d342b494172182623f150f">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17.349999999999998%" headers="mcps1.3.2.3.2.2.5.1.3 "><p id="dns_api_67006__a5f56142551544aff8f99a8519c45e8c5">String</p>
</td>
<td class="cellrowborder" valign="top" width="42.64%" headers="mcps1.3.2.3.2.2.5.1.4 "><p id="dns_api_67006__af2be59fc13474cdbb11ea3ce65ad1dfa">Project ID. You can obtain it in <a href="dns_api_80007.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
<tr id="dns_api_67006__rf27add3e7a944b14819763911f5fde7c"><td class="cellrowborder" valign="top" width="22.64%" headers="mcps1.3.2.3.2.2.5.1.1 "><p id="dns_api_67006__a05d15e734e994570a07d9814f4d5d594">resource_type</p>
</td>
<td class="cellrowborder" valign="top" width="17.37%" headers="mcps1.3.2.3.2.2.5.1.2 "><p id="dns_api_67006__a64a15d111ae74078a66bf54abcf4c9ff">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17.349999999999998%" headers="mcps1.3.2.3.2.2.5.1.3 "><p id="dns_api_67006__af8f958157b664e299ef1e1afcf441a9c">String</p>
</td>
<td class="cellrowborder" valign="top" width="42.64%" headers="mcps1.3.2.3.2.2.5.1.4 "><p id="dns_api_67006__p2879133744119">Resource type.</p>
<ul id="dns_api_67006__ul3997124517225"><li id="dns_api_67006__dns_api_67001_li166466010217">DNS-public_zone</li><li id="dns_api_67006__dns_api_67001_li1264680132118">DNS-private_zone</li><li id="dns_api_67006__dns_api_67001_li136469010215">DNS-public_recordset</li><li id="dns_api_67006__dns_api_67001_li176467015215">DNS-private_recordset</li><li id="dns_api_67006__dns_api_67001_li126461909212">DNS-ptr_record</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="dns_api_67006__s1f778fe858bc44ffbb2aa37ffaa1e116"><h4 class="sectiontitle">Request</h4><ul id="dns_api_67006__ub3f7b006c13d4413ab8177b9ddab1661"><li id="dns_api_67006__lf66e181214b44e789947bccc37b8eebe">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dns_api_67006__tb06f4f4b35c94f68b3bca7c2155e0126" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameters in the request</caption><thead align="left"><tr id="dns_api_67006__r870f3c315b9048009d9896b5ea970423"><th align="left" class="cellrowborder" valign="top" width="19.8%" id="mcps1.3.3.2.1.1.2.5.1.1"><p id="dns_api_67006__a9be1225ebd6445aaa71d7de2258c3744"><strong id="dns_api_67006__b1560516406910">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.5%" id="mcps1.3.3.2.1.1.2.5.1.2"><p id="dns_api_67006__af809a931c8c64f2ab0c1481b0c0ae061"><strong id="dns_api_67006__b460614013911">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.8%" id="mcps1.3.3.2.1.1.2.5.1.3"><p id="dns_api_67006__a2dbf8296ade74459b85d45db216c4290"><strong id="dns_api_67006__b106069401193">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="48.9%" id="mcps1.3.3.2.1.1.2.5.1.4"><p id="dns_api_67006__acf61e6cae8b64132874080f05a52d7ef"><strong id="dns_api_67006__b186062040793">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="dns_api_67006__r5cf51c052eac4be485c8ca05721c7a1a"><td class="cellrowborder" valign="top" width="19.8%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="dns_api_67006__a474dc55159124b3e9c370011fa217463">tags</p>
</td>
<td class="cellrowborder" valign="top" width="13.5%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="dns_api_67006__af717102a783f455bb2308a292537fcae">No</p>
</td>
<td class="cellrowborder" valign="top" width="17.8%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="dns_api_67006__p196721612141417">Array of <a href="#dns_api_67006__tb2c210e5c1f44fad9eaeb485e2da1424">tags</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="48.9%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="dns_api_67006__a3ffd26e94c7945a58a31cdda3fd6fb99">Includes specified tags. For details, see <a href="#dns_api_67006__tb2c210e5c1f44fad9eaeb485e2da1424">Table 3</a>.</p>
<p id="dns_api_67006__p196631291593">The structure body is mandatory. A maximum of 20 tag keys are allowed in each query operation. The tag key cannot be left blank or set to the empty string. One tag key can have up to 20 tag values. Each tag key must be unique, and the tag values of one key must also be unique.</p>
</td>
</tr>
<tr id="dns_api_67006__r99a6a134768b4fe0a9a39f5937d5d3b5"><td class="cellrowborder" valign="top" width="19.8%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="dns_api_67006__a35bc80ef6a00468abb7cf4f22933ff64">tags_any</p>
</td>
<td class="cellrowborder" valign="top" width="13.5%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="dns_api_67006__ab5ab6ef6efef4386a4afb899282d3092">No</p>
</td>
<td class="cellrowborder" valign="top" width="17.8%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="dns_api_67006__p816310154149">Array of <a href="#dns_api_67006__tb2c210e5c1f44fad9eaeb485e2da1424">tags</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="48.9%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="dns_api_67006__a26c27c508b6448ff8eb40cb4c639020c">Includes any of the specified tags. For details, see <a href="#dns_api_67006__tb2c210e5c1f44fad9eaeb485e2da1424">Table 3</a>.</p>
<p id="dns_api_67006__p688515914109">The structure body is mandatory. A maximum of 20 tag keys are allowed in each query operation. The tag key cannot be left blank or set to the empty string. One tag key can have up to 20 tag values. Each tag key must be unique, and the tag values of one key must also be unique.</p>
</td>
</tr>
<tr id="dns_api_67006__r312274f5bc614453b9f0182d8c1b8f31"><td class="cellrowborder" valign="top" width="19.8%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="dns_api_67006__a2badc302985c4a07a39675214a576f03">not_tags</p>
</td>
<td class="cellrowborder" valign="top" width="13.5%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="dns_api_67006__ae7560f3d42a241fe87b9268730d86d98">No</p>
</td>
<td class="cellrowborder" valign="top" width="17.8%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="dns_api_67006__a77db840a97da4e81a507b151141b1936">Array of <a href="#dns_api_67006__tb2c210e5c1f44fad9eaeb485e2da1424">tags</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="48.9%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="dns_api_67006__ac3ecce5080bd46b791eb9ea33219f13c">Excludes specified tags. For details, see <a href="#dns_api_67006__tb2c210e5c1f44fad9eaeb485e2da1424">Table 3</a>.</p>
<p id="dns_api_67006__p1543220651110">The structure body is mandatory. A maximum of 20 tag keys are allowed in each query operation. The tag key cannot be left blank or set to the empty string. One tag key can have up to 20 tag values. Each tag key must be unique, and the tag values of one key must also be unique.</p>
</td>
</tr>
<tr id="dns_api_67006__rcb4c18c8024344d48deadb3c1ceea94b"><td class="cellrowborder" valign="top" width="19.8%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="dns_api_67006__adfaaffce4eae4829a5f32a14eebe4176">not_tags_any</p>
</td>
<td class="cellrowborder" valign="top" width="13.5%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="dns_api_67006__a4b071b97ef9742fab53e7e392b3bf2bc">No</p>
</td>
<td class="cellrowborder" valign="top" width="17.8%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="dns_api_67006__p0311732161411">Array of <a href="#dns_api_67006__tb2c210e5c1f44fad9eaeb485e2da1424">tags</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="48.9%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="dns_api_67006__ac4670404f0884590b2c25f855c7949a7">Excludes any of the specified tags. For details, see <a href="#dns_api_67006__tb2c210e5c1f44fad9eaeb485e2da1424">Table 3</a>.</p>
<p id="dns_api_67006__p30711151112">The structure body is mandatory. A maximum of 20 tag keys are allowed in each query operation. The tag key cannot be left blank or set to the empty string. One tag key can have up to 20 tag values. Each tag key must be unique, and the tag values of one key must also be unique.</p>
</td>
</tr>
<tr id="dns_api_67006__rf2bfc3c71b6b4c82a44ea2a48d974822"><td class="cellrowborder" valign="top" width="19.8%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="dns_api_67006__aea1a32690372433c97dc2a6d7a4cc1a3">limit</p>
</td>
<td class="cellrowborder" valign="top" width="13.5%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="dns_api_67006__a1de307db033e47e5831bb8e73262f1c9">No</p>
</td>
<td class="cellrowborder" valign="top" width="17.8%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="dns_api_67006__p5201154364215">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="48.9%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="dns_api_67006__p230120311413">Number of resources on each page</p>
<p id="dns_api_67006__p147131447514">The value range is 11000.</p>
<ul id="dns_api_67006__ul32433360317"><li id="dns_api_67006__li02435361134">If <strong id="dns_api_67006__b84235270692122">action</strong> is set to <strong id="dns_api_67006__b84235270692134">filter</strong>, the default value is <strong id="dns_api_67006__b19626194614914">1000</strong>.</li><li id="dns_api_67006__li1799617371639">If <strong id="dns_api_67006__b842352706152943">action</strong> is set to <strong id="dns_api_67006__b842352706152951">count</strong>, this parameter does not take effect.</li></ul>
</td>
</tr>
<tr id="dns_api_67006__r09054f0ce9c8438698d0b7928d5977a1"><td class="cellrowborder" valign="top" width="19.8%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="dns_api_67006__acfe40660f4704831845244f5d21e1e3d">offset</p>
</td>
<td class="cellrowborder" valign="top" width="13.5%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="dns_api_67006__en-us_topic_0123490185_p765135818031">No</p>
</td>
<td class="cellrowborder" valign="top" width="17.8%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="dns_api_67006__p1982028131019">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="48.9%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="dns_api_67006__p35951433204916">Start offset of pagination query. The query will start from the next resource of the offset value.</p>
<p id="dns_api_67006__p18898143914915">The value ranges from <strong id="dns_api_67006__b148648337533">0</strong> to <strong id="dns_api_67006__b1865143385312">2147483647</strong>.</p>
<p id="dns_api_67006__p13209172234718">The default value is 0.</p>
<ul id="dns_api_67006__ul7272852175312"><li id="dns_api_67006__li02721152175319">You do not need to specify this parameter when querying resources on the first page.</li><li id="dns_api_67006__li11272175225316">When you query resources on subsequent pages, set the value of <strong id="dns_api_67006__b842352706101324">offset</strong> to the location returned in the response body for the previous query.</li><li id="dns_api_67006__li122727526538">If <strong id="dns_api_67006__b84235270692726">action</strong> is set to <strong id="dns_api_67006__b84235270692731">filter</strong>, this parameter takes effect. Its value can be 0 (default) or a positive integer.</li><li id="dns_api_67006__li1627255212539">If <strong id="dns_api_67006__b362770662">action</strong> is set to <strong id="dns_api_67006__b719499187">count</strong>, this parameter does not take effect.</li></ul>
</td>
</tr>
<tr id="dns_api_67006__r419264becf14466cabd9b38178560e63"><td class="cellrowborder" valign="top" width="19.8%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="dns_api_67006__a97d276945fbd43bdb98d2f7f17e54a33">action</p>
</td>
<td class="cellrowborder" valign="top" width="13.5%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="dns_api_67006__a84511b82712044bca5f56780d91970ff">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17.8%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="dns_api_67006__en-us_topic_0123490185_p119142418031">String</p>
</td>
<td class="cellrowborder" valign="top" width="48.9%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="dns_api_67006__aad7e6106827a43a1858dafe53b83e22d">Operation to be performed</p>
<p id="dns_api_67006__a2b9a1fecc8b14740bd6a0220d62500c8">The value can be:</p>
<ul id="dns_api_67006__ul1240981910525"><li id="dns_api_67006__li14099195521"><strong id="dns_api_67006__b842352706103947">filter</strong>: queries resources in pages by filter condition.</li><li id="dns_api_67006__li11409131955213"><strong id="dns_api_67006__b842352706104030">count</strong>: queries the total number of resources.</li></ul>
</td>
</tr>
<tr id="dns_api_67006__rd44a180697704df2a49a4d373c3078e2"><td class="cellrowborder" valign="top" width="19.8%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="dns_api_67006__a7f8cb0b76cb54a3385cb12f2a06491ba">matches</p>
</td>
<td class="cellrowborder" valign="top" width="13.5%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="dns_api_67006__a3750d26fc2b6422d99b537ae889d4b17">No</p>
</td>
<td class="cellrowborder" valign="top" width="17.8%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="dns_api_67006__p168091539101416">Array of <a href="#dns_api_67006__tddefa9c37bda4fab97a689a2dcf0ac0e">matches</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="48.9%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="dns_api_67006__abe290bcf898740e2ad76c48d098c6cb8">Field to be matched. For details, see <a href="#dns_api_67006__tddefa9c37bda4fab97a689a2dcf0ac0e">Table 4</a>.</p>
<p id="dns_api_67006__a7c20b93547bb4bc29f22d3c79a4d0710">This parameter specifies the key-value pair to be matched in the query.</p>
<p id="dns_api_67006__a3760f1bfd4e44db88d21728a4357e51e">If <strong id="dns_api_67006__b84235270610160">value</strong> is left blank, exact matching will work. Otherwise, fuzzy matching will work.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="dns_api_67006__tb2c210e5c1f44fad9eaeb485e2da1424"></a><a name="tb2c210e5c1f44fad9eaeb485e2da1424"></a><table cellpadding="4" cellspacing="0" summary="" id="dns_api_67006__tb2c210e5c1f44fad9eaeb485e2da1424" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Parameters in the <strong id="dns_api_67006__b68664333112">tags</strong> field</caption><thead align="left"><tr id="dns_api_67006__r75bc9d909ae3472a9c7a3f44d4b7f8f8"><th align="left" class="cellrowborder" valign="top" width="19.54%" id="mcps1.3.3.2.1.2.2.5.1.1"><p id="dns_api_67006__ad966754362394a4ca7e94700a01114e9"><strong id="dns_api_67006__b12617104011912">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.590000000000002%" id="mcps1.3.3.2.1.2.2.5.1.2"><p id="dns_api_67006__afbb54878c81348ab812caa43db1ad751"><strong id="dns_api_67006__b136171040793">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.9%" id="mcps1.3.3.2.1.2.2.5.1.3"><p id="dns_api_67006__a34d95cfd430f4172b8e5252a83616aab"><strong id="dns_api_67006__b561810401691">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="45.97%" id="mcps1.3.3.2.1.2.2.5.1.4"><p id="dns_api_67006__a61526b5c1b1243e9923524b8c4060e92"><strong id="dns_api_67006__b1761816401099">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="dns_api_67006__raa8d7d3e734e4b939b7224d3497582f0"><td class="cellrowborder" valign="top" width="19.54%" headers="mcps1.3.3.2.1.2.2.5.1.1 "><p id="dns_api_67006__a296adc25efe24b5ca1a179ceda99bca4">key</p>
</td>
<td class="cellrowborder" valign="top" width="15.590000000000002%" headers="mcps1.3.3.2.1.2.2.5.1.2 "><p id="dns_api_67006__a30ae6511738a4ca3abd8fe5137773aba">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="18.9%" headers="mcps1.3.3.2.1.2.2.5.1.3 "><p id="dns_api_67006__aec1d4df913254d11937a55779eb2b3fe">String</p>
</td>
<td class="cellrowborder" valign="top" width="45.97%" headers="mcps1.3.3.2.1.2.2.5.1.4 "><p id="dns_api_67006__p011410211144">Tag key</p>
<p id="dns_api_67006__p12621122816413">A key can contain up to 36 Unicode characters. The key cannot be empty. </p>
</td>
</tr>
<tr id="dns_api_67006__r8ad1636f73434dda92c87d3693fef1c5"><td class="cellrowborder" valign="top" width="19.54%" headers="mcps1.3.3.2.1.2.2.5.1.1 "><p id="dns_api_67006__aae08144e8a3342a48e279cd4f4137be7">values</p>
</td>
<td class="cellrowborder" valign="top" width="15.590000000000002%" headers="mcps1.3.3.2.1.2.2.5.1.2 "><p id="dns_api_67006__ac9fa5e936d0c4535b20ee342ea0ac906">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="18.9%" headers="mcps1.3.3.2.1.2.2.5.1.3 "><p id="dns_api_67006__p188882535148">Array of strings</p>
</td>
<td class="cellrowborder" valign="top" width="45.97%" headers="mcps1.3.3.2.1.2.2.5.1.4 "><p id="dns_api_67006__p592417401420">Tag value</p>
<p id="dns_api_67006__p3383124915419">Each value can contain up to 43 Unicode characters and can be an empty string. </p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="dns_api_67006__tddefa9c37bda4fab97a689a2dcf0ac0e"></a><a name="tddefa9c37bda4fab97a689a2dcf0ac0e"></a><table cellpadding="4" cellspacing="0" summary="" id="dns_api_67006__tddefa9c37bda4fab97a689a2dcf0ac0e" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Parameters in the <strong id="dns_api_67006__b84235270694056">matches</strong> field</caption><thead align="left"><tr id="dns_api_67006__r7077b0e28dbe4174a5cc6473e28bcfb2"><th align="left" class="cellrowborder" valign="top" width="19.73%" id="mcps1.3.3.2.1.3.2.5.1.1"><p id="dns_api_67006__en-us_topic_0123490185_p2130318031"><strong id="dns_api_67006__b3621840392">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.4%" id="mcps1.3.3.2.1.3.2.5.1.2"><p id="dns_api_67006__en-us_topic_0123490185_p172557318031"><strong id="dns_api_67006__b166216401598">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.9%" id="mcps1.3.3.2.1.3.2.5.1.3"><p id="dns_api_67006__en-us_topic_0123490185_p555372818031"><strong id="dns_api_67006__b662119403920">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="45.97%" id="mcps1.3.3.2.1.3.2.5.1.4"><p id="dns_api_67006__a672c489165984b23b4ac7ff110d2f8d0"><strong id="dns_api_67006__b1162218405914">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="dns_api_67006__r2f58632024304bcab1f6545bca0f6571"><td class="cellrowborder" valign="top" width="19.73%" headers="mcps1.3.3.2.1.3.2.5.1.1 "><p id="dns_api_67006__a1e5aa42a1ac9460791ffca2df385599c">key</p>
</td>
<td class="cellrowborder" valign="top" width="15.4%" headers="mcps1.3.3.2.1.3.2.5.1.2 "><p id="dns_api_67006__a96219506a0114ef3b5f6e09afd519e2e">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="18.9%" headers="mcps1.3.3.2.1.3.2.5.1.3 "><p id="dns_api_67006__en-us_topic_0123490185_p735269618031">String</p>
</td>
<td class="cellrowborder" valign="top" width="45.97%" headers="mcps1.3.3.2.1.3.2.5.1.4 "><p id="dns_api_67006__ac55706719e7d4b36bcd2b64fb641e8ad">Key to be matched. It can only be <strong id="dns_api_67006__b842352706191718">resource_name</strong>.</p>
</td>
</tr>
<tr id="dns_api_67006__rd2297e30a76f4f9db7d25d69c4a6f284"><td class="cellrowborder" valign="top" width="19.73%" headers="mcps1.3.3.2.1.3.2.5.1.1 "><p id="dns_api_67006__a955ce5b872f54445a8cfb91d31e3e515">value</p>
</td>
<td class="cellrowborder" valign="top" width="15.4%" headers="mcps1.3.3.2.1.3.2.5.1.2 "><p id="dns_api_67006__aa41ce3d226664d388cdbff6371aa0873">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="18.9%" headers="mcps1.3.3.2.1.3.2.5.1.3 "><p id="dns_api_67006__en-us_topic_0123490185_p350303918031">String</p>
</td>
<td class="cellrowborder" valign="top" width="45.97%" headers="mcps1.3.3.2.1.3.2.5.1.4 "><p id="dns_api_67006__ad834a2ed8a664de4bce813d49cc4213b">Value to be matched. It contains a maximum of 255 Unicode characters and cannot contain underscores (_) and percent sign (%).</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="dns_api_67006__l08de504570e043d3b860051761ac1fb8">Example request<div class="p" id="dns_api_67006__p786413810513"><a name="dns_api_67006__l08de504570e043d3b860051761ac1fb8"></a><a name="l08de504570e043d3b860051761ac1fb8"></a>Query DNS resources by tag.<pre class="codeblock" id="dns_api_67006__codeblock0429173715118">POST https://{DNS_Endpoint}/v2/{project_id}/DNS-private_zone/resource_instances/action</pre>
</div>
<div class="p" id="dns_api_67006__p15430113717519">The following is a request example when <strong id="dns_api_67006__b842352706211644">action</strong> is set to <strong id="dns_api_67006__b842352706211650">filter</strong>:<pre class="screen" id="dns_api_67006__screen18430113711515">{
"offset": "100",
"limit": "100",
"action": "filter",
"matches": [
{
"key": "resource_name",
"value": "resource1"
}
],
"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"
]
}
]
}</pre>
</div>
<div class="p" id="dns_api_67006__p1043483765119">The following is a request example when <strong id="dns_api_67006__b158911304994314">action</strong> is set to <strong id="dns_api_67006__b157647237894314">count</strong>:<pre class="screen" id="dns_api_67006__screen12434737115120">{
"action": "count",
"not_tags": [
{
"key": "key1",
"values": [
"value1",
"*value2"
]
}
],
"tags": [
{
"key": "key1",
"values": [
"value1",
"value2"
]
},
{
"key": "key2",
"values": [
"value1",
"value2"
]
}
],
"tags_any": [
{
"key": "key1",
"values": [
"value1",
"value2"
]
}
],
"not_tags_any": [
{
"key": "key1",
"values": [
"value1",
"value2"
]
}
],
"matches": [
{
"key": "resource_name",
"value": "resource1"
}
]
}</pre>
</div>
</li></ul>
</div>
<div class="section" id="dns_api_67006__sa5067885f5544ce5bae155c4813b5010"><h4 class="sectiontitle">Response</h4><ul id="dns_api_67006__u7cfb6ad5cd1a4ed28475477ce005a633"><li id="dns_api_67006__l39ddb598c76a443c93755fd5a779d0b8">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dns_api_67006__t93ffcfa8fbbe4abcb969defd2a74fa2d" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Parameters in the response</caption><thead align="left"><tr id="dns_api_67006__ra25a22e127e6425fb02bdcc4c86e44f6"><th align="left" class="cellrowborder" valign="top" width="22.81%" id="mcps1.3.4.2.1.1.2.4.1.1"><p id="dns_api_67006__a296f7700dac14acb913c0d4cfc4c1242"><strong id="dns_api_67006__b462412407917">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="26.75%" id="mcps1.3.4.2.1.1.2.4.1.2"><p id="dns_api_67006__adc79b60087ab4c80b586816493181550"><strong id="dns_api_67006__b662419403912">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50.44%" id="mcps1.3.4.2.1.1.2.4.1.3"><p id="dns_api_67006__a144302e9d47446eeaeab02331e0902e2"><strong id="dns_api_67006__b1562519401092">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="dns_api_67006__r1112394dde664478bbbffb5e3f601aeb"><td class="cellrowborder" valign="top" width="22.81%" headers="mcps1.3.4.2.1.1.2.4.1.1 "><p id="dns_api_67006__acc27bc81988d493e8b21ae8ca69371a0">resources</p>
</td>
<td class="cellrowborder" valign="top" width="26.75%" headers="mcps1.3.4.2.1.1.2.4.1.2 "><p id="dns_api_67006__a0d48338359754182b83c7d83a8a3fcd3">Array of <a href="#dns_api_67006__t3e476a1cfb8049779a2717fcc171190c">resource</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="50.44%" headers="mcps1.3.4.2.1.1.2.4.1.3 "><p id="dns_api_67006__a31b758a590b24f38a1b6ff57be47f7a1">Resource list For details, see <a href="#dns_api_67006__t3e476a1cfb8049779a2717fcc171190c">Table 6</a>.</p>
</td>
</tr>
<tr id="dns_api_67006__r13fafef109aa4ca3a77f5674457dc84e"><td class="cellrowborder" valign="top" width="22.81%" headers="mcps1.3.4.2.1.1.2.4.1.1 "><p id="dns_api_67006__a220b5c3ec6204c5ab0155e0dbdec40e6">total_count</p>
</td>
<td class="cellrowborder" valign="top" width="26.75%" headers="mcps1.3.4.2.1.1.2.4.1.2 "><p id="dns_api_67006__aea14055203614399a52ae2ffb18f014c">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50.44%" headers="mcps1.3.4.2.1.1.2.4.1.3 "><p id="dns_api_67006__a49379e7d97b24743bd03df577f6cead4">Number of resources that meet the filter criteria. The number is irrelevant to <strong id="dns_api_67006__b15991112751210">limit</strong> or <strong id="dns_api_67006__b29913270124">offset</strong>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="dns_api_67006__t3e476a1cfb8049779a2717fcc171190c"></a><a name="t3e476a1cfb8049779a2717fcc171190c"></a><table cellpadding="4" cellspacing="0" summary="" id="dns_api_67006__t3e476a1cfb8049779a2717fcc171190c" frame="border" border="1" rules="all"><caption><b>Table 6 </b>Parameters in the <strong id="dns_api_67006__b307459470">resources</strong> field</caption><thead align="left"><tr id="dns_api_67006__rd120153f066f40ef8ef08f1152872177"><th align="left" class="cellrowborder" valign="top" width="23.189999999999998%" id="mcps1.3.4.2.1.2.2.4.1.1"><p id="dns_api_67006__en-us_topic_0123490185_p17211504363"><strong id="dns_api_67006__b166271540298">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="26.38%" id="mcps1.3.4.2.1.2.2.4.1.2"><p id="dns_api_67006__en-us_topic_0123490185_p17216704366"><strong id="dns_api_67006__b662718401892">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50.43%" id="mcps1.3.4.2.1.2.2.4.1.3"><p id="dns_api_67006__a9e960e5aa1c54db3805d766f0274b42e"><strong id="dns_api_67006__b86281840095">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="dns_api_67006__rd5c5239182a04cbf90ff620d5bac4e95"><td class="cellrowborder" valign="top" width="23.189999999999998%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="dns_api_67006__aee8c1fb529ec460cacb6ed4cae20c4ea">resource_id</p>
</td>
<td class="cellrowborder" valign="top" width="26.38%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="dns_api_67006__en-us_topic_0123490185_p1232603365">String</p>
</td>
<td class="cellrowborder" valign="top" width="50.43%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="dns_api_67006__en-us_topic_0123490185_p172367023619">Resource ID</p>
</td>
</tr>
<tr id="dns_api_67006__r9cb6270a18704fc8b5da917c9e9c8451"><td class="cellrowborder" valign="top" width="23.189999999999998%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="dns_api_67006__ae83fa7e9bc4f40f4b28d14d2fc779af7">resource_detail</p>
</td>
<td class="cellrowborder" valign="top" width="26.38%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="dns_api_67006__af84e030d49a3448fa1c13ac1ce325679">Object</p>
</td>
<td class="cellrowborder" valign="top" width="50.43%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="dns_api_67006__a32fec0e09c2247a0aa6e5754144b3920">Resource details. This field is reserved for subsequent extension, and its value defaults to an empty string.</p>
</td>
</tr>
<tr id="dns_api_67006__ra651330f319f4b55add1adc003cab0c5"><td class="cellrowborder" valign="top" width="23.189999999999998%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="dns_api_67006__en-us_topic_0123490185_p325210033618">tags</p>
</td>
<td class="cellrowborder" valign="top" width="26.38%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="dns_api_67006__en-us_topic_0123490185_p62596018369">Array of <a href="dns_api_80006.html#dns_api_80006__table19530794112436">tag</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="50.43%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="dns_api_67006__en-us_topic_0123490185_p22617043616">List of queried tags. If no tag is matched, an empty array is returned. For details, see <a href="#dns_api_67006__table64133124514">Table 7</a>.</p>
</td>
</tr>
<tr id="dns_api_67006__r24cb9cf0de95421199a90debd0f8973c"><td class="cellrowborder" valign="top" width="23.189999999999998%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="dns_api_67006__a2bc79a175c4842caab31f944c0a3dcd9">resource_name</p>
</td>
<td class="cellrowborder" valign="top" width="26.38%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="dns_api_67006__en-us_topic_0123490185_p827019012366">String</p>
</td>
<td class="cellrowborder" valign="top" width="50.43%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="dns_api_67006__en-us_topic_0123490185_p527500133615">Resource name. If no resource name is matched, the value is left blank.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="dns_api_67006__table64133124514"></a><a name="table64133124514"></a><table cellpadding="4" cellspacing="0" summary="" id="dns_api_67006__table64133124514" frame="border" border="1" rules="all"><caption><b>Table 7 </b>Description of the <strong id="dns_api_67006__dns_api_80006_b410310455010">tag</strong> field</caption><thead align="left"><tr id="dns_api_67006__dns_api_80006_row15361836112436"><th align="left" class="cellrowborder" valign="top" width="18.011801180118013%" id="mcps1.3.4.2.1.3.2.4.1.1"><p id="dns_api_67006__dns_api_80006_p58707511112436"><strong id="dns_api_67006__dns_api_80006_b129171645401">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.28192819281928%" id="mcps1.3.4.2.1.3.2.4.1.2"><p id="dns_api_67006__dns_api_80006_p42210623112436"><strong id="dns_api_67006__dns_api_80006_b117891464017">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="62.70627062706271%" id="mcps1.3.4.2.1.3.2.4.1.3"><p id="dns_api_67006__dns_api_80006_p63617265112436"><strong id="dns_api_67006__dns_api_80006_b15591647504">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="dns_api_67006__dns_api_80006_row35684479112436"><td class="cellrowborder" valign="top" width="18.011801180118013%" headers="mcps1.3.4.2.1.3.2.4.1.1 "><p id="dns_api_67006__dns_api_80006_p13313439112530">key</p>
</td>
<td class="cellrowborder" valign="top" width="19.28192819281928%" headers="mcps1.3.4.2.1.3.2.4.1.2 "><p id="dns_api_67006__dns_api_80006_p35653193112436">String</p>
</td>
<td class="cellrowborder" valign="top" width="62.70627062706271%" headers="mcps1.3.4.2.1.3.2.4.1.3 "><p id="dns_api_67006__dns_api_80006_p011410211144">Tag key</p>
<p id="dns_api_67006__dns_api_80006_p12621122816413">A key can contain up to 36 Unicode characters. The key cannot be empty. </p>
</td>
</tr>
<tr id="dns_api_67006__dns_api_80006_row20048002112436"><td class="cellrowborder" valign="top" width="18.011801180118013%" headers="mcps1.3.4.2.1.3.2.4.1.1 "><p id="dns_api_67006__dns_api_80006_p66095544112533">value</p>
</td>
<td class="cellrowborder" valign="top" width="19.28192819281928%" headers="mcps1.3.4.2.1.3.2.4.1.2 "><p id="dns_api_67006__dns_api_80006_p60123528112436">String</p>
</td>
<td class="cellrowborder" valign="top" width="62.70627062706271%" headers="mcps1.3.4.2.1.3.2.4.1.3 "><p id="dns_api_67006__dns_api_80006_p592417401420">Tag value</p>
<p id="dns_api_67006__dns_api_80006_p3383124915419">Each value can contain up to 43 Unicode characters and can be an empty string. </p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="dns_api_67006__uf79a1ab17f024339a290d92a214c4954"><li id="dns_api_67006__l6fa2061ab47241de8557087b207e9dc7">Example response<div class="p" id="dns_api_67006__a294134c8e0be4a83adcfb62b32f4d386"><a name="dns_api_67006__l6fa2061ab47241de8557087b207e9dc7"></a><a name="l6fa2061ab47241de8557087b207e9dc7"></a>The following is a request example when <strong id="dns_api_67006__b25740759">action</strong> is set to <strong id="dns_api_67006__b1451318603">filter</strong>:<pre class="screen" id="dns_api_67006__s78484a25fd1f42ddba20e5b0b4d7cc94">{
"resources": [
{
"resource_detail": null,
"resource_id": "cdfs_cefs_wesas_12_dsad",
"resource_name": "resouece1",
"tags": [
{
"key": "key1",
"value": "value1"
},
{
"key": "key2",
"value": "value1"
}
]
}
],
"total_count": 1000
}</pre>
</div>
<div class="p" id="dns_api_67006__a1ef99ca64a774e7e8002cb39667fafa2">The following is a request example when <strong id="dns_api_67006__b1846761835">action</strong> is set to <strong id="dns_api_67006__b186569197">count</strong>:<pre class="screen" id="dns_api_67006__sd3a9dc2cb7824ec182d5ee24cfbfa9d9">{
"total_count": 1000
}</pre>
</div>
</li></ul>
</div>
<div class="section" id="dns_api_67006__section9249181042119"><h4 class="sectiontitle">Returned Value</h4><p id="dns_api_67006__dns_api_61001_p711102924515">If a 2xx status code is returned, for example, 200, 202, or 204, the request is successful.</p>
<p id="dns_api_67006__dns_api_61001_p18506102624518">For details, see <a href="dns_api_80002.html">Status Code</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dns_api_67000.html">Tag Management</a></div>
</div>
</div>