forked from docs/doc-exports
Reviewed-by: Kucerak, Kristian <kristian.kucerak@t-systems.com> Co-authored-by: Qin Ying, Fan <fanqinying@huawei.com> Co-committed-by: Qin Ying, Fan <fanqinying@huawei.com>
419 lines
32 KiB
HTML
419 lines
32 KiB
HTML
<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>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>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>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>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__a61960b908f644177b46c8ddc6c95c941">Resource type, which can be <strong>DNS-public_zone</strong>, <strong>DNS-private_zone</strong>, <strong>DNS-public_recordset</strong>, <strong>DNS-private_recordset</strong>, or <strong>DNS-ptr_record</strong></p>
|
||
</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>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>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>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>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 object</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 10 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 object</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__p89871734171017">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 10 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 object</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__p1648652916111">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 10 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 object</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__p868275610125">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 10 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 1–1000.</p>
|
||
<ul id="dns_api_67006__ul32433360317"><li id="dns_api_67006__li02435361134">If the value of <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__b220383416">action</strong> is set to <strong id="dns_api_67006__b137758049">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 object</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, an exact match is performed. Otherwise, a fuzzy match is performed.</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>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>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>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>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__a9fc8983744854c459f9d89f0fb75ba76">Tag key. A key contains 127 Unicode characters and cannot be blank. (This parameter is not verified in the search process.)</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__a42c53b30ce50457e999e286d86a7268b">Values of the tag.</p>
|
||
<p id="dns_api_67006__ad36b2b1a449f4f66a898a59c9ea4ca9a">A value contains a maximum of 255 Unicode characters.</p>
|
||
<p id="dns_api_67006__ac2f20f96c50245928e2a48e29bff1b18">The asterisk (*) is a reserved character.</p>
|
||
<p id="dns_api_67006__ae001ea87f71c45918b92a6b18937abf2">If the value starts with an asterisk (*), fuzzy matching will work for the string following the asterisk.</p>
|
||
<p id="dns_api_67006__ab4462955b3ee4cfd98e9a32c55b42432">If this parameter is not specified, any value is matched. The values are in OR relationship.</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>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>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>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>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. Currently, 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>
|
||
<p id="dns_api_67006__en-us_topic_0123490185_p357886218031"></p>
|
||
</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>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>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>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 object</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__b2138113656">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>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>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>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">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__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 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__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_80006.html#dns_api_80006__table19530794112436">Table 2</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>
|
||
</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__b498672377">action</strong> is set to <strong id="dns_api_67006__b2123747256">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__b891622081">action</strong> is set to <strong id="dns_api_67006__b1557966993">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 the API call returns a code of 2<em id="dns_api_67006__dns_api_61001_i113378598177">xx</em>, 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>
|
||
|