doc-exports/docs/dds/api-ref/dds_api_0032.html
Wang , Deng Ke 4c6bc53817 dds api for docs/document-database-service#35
Reviewed-by: Boka, Ladislav <ladislav.boka@t-systems.com>
Co-authored-by: Wang , Deng Ke <wangdengke2@huawei.com>
Co-committed-by: Wang , Deng Ke <wangdengke2@huawei.com>
2023-07-11 10:47:18 +00:00

340 lines
25 KiB
HTML

<a name="dds_api_0032"></a><a name="dds_api_0032"></a>
<h1 class="topictitle1">Querying Resources by Tag</h1>
<div id="body8662426"><div class="section" id="dds_api_0032__sdb96d603244345c391f4b5ebd12a22fa"><h4 class="sectiontitle">Function</h4><p id="dds_api_0032__p74931295615">This API is used to query the specified DB instances by tag.</p>
</div>
<div class="section" id="dds_api_0032__section3571123175917"><h4 class="sectiontitle">Constraints</h4><p id="dds_api_0032__p126120525165">A maximum of 20 tags can be added to a DB instance. The tag key must be unique.</p>
</div>
<div class="section" id="dds_api_0032__sf61442e26fcc4259a131c02dee020a10"><h4 class="sectiontitle">URI</h4><ul id="dds_api_0032__en-us_topic_0091754391_ul55999443"><li id="dds_api_0032__en-us_topic_0091754391_li34232944">URI format<p id="dds_api_0032__p113061756351"><a name="dds_api_0032__en-us_topic_0091754391_li34232944"></a><a name="en-us_topic_0091754391_li34232944"></a>POST https://{Endpoint}/v3/{project_id}/instances/action</p>
</li><li id="dds_api_0032__en-us_topic_0091754391_li21405046">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dds_api_0032__en-us_topic_0091754391_table58427690" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="dds_api_0032__en-us_topic_0091754391_row1482002"><th align="left" class="cellrowborder" valign="top" width="21.3%" id="mcps1.3.3.2.2.1.2.4.1.1"><p id="dds_api_0032__en-us_topic_0091754391_p52933326">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.91%" id="mcps1.3.3.2.2.1.2.4.1.2"><p id="dds_api_0032__en-us_topic_0091754391_p59740974">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="63.79%" id="mcps1.3.3.2.2.1.2.4.1.3"><p id="dds_api_0032__p2775334615440">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dds_api_0032__en-us_topic_0091754391_row44765691"><td class="cellrowborder" valign="top" width="21.3%" headers="mcps1.3.3.2.2.1.2.4.1.1 "><p id="dds_api_0032__en-us_topic_0091754391_p2142393">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="14.91%" headers="mcps1.3.3.2.2.1.2.4.1.2 "><p id="dds_api_0032__en-us_topic_0091754391_p39316155">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="63.79%" headers="mcps1.3.3.2.2.1.2.4.1.3 "><p id="dds_api_0032__en-us_topic_0091754391_p30492010">Specifies the project ID of a tenant in a region.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="dds_api_0032__s09d438844e694f72b12fc288c723116a"><h4 class="sectiontitle">Requests</h4><ul id="dds_api_0032__u001e149348604f4090110110817a1112"><li id="dds_api_0032__l9761b2ad053545a7a7185a665b7cfbff">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dds_api_0032__te7f01ccb355a4f29a1a97bea177cc736" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="dds_api_0032__r1d2e972ffada4dd7be764ebfa5663add"><th align="left" class="cellrowborder" valign="top" width="21.66%" id="mcps1.3.4.2.1.1.2.5.1.1"><p id="dds_api_0032__a40b2b823012a4d6c8da07baa32d6a263">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.11%" id="mcps1.3.4.2.1.1.2.5.1.2"><p id="dds_api_0032__a61de8d6c3e1641b5ad4b6acab98c5481">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.990000000000002%" id="mcps1.3.4.2.1.1.2.5.1.3"><p id="dds_api_0032__a61b7a35f766c43abb8fb7264a42b0364">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="42.24%" id="mcps1.3.4.2.1.1.2.5.1.4"><p id="dds_api_0032__p1337317311951">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dds_api_0032__row689815514814"><td class="cellrowborder" valign="top" width="21.66%" headers="mcps1.3.4.2.1.1.2.5.1.1 "><p id="dds_api_0032__p954751010916">offset</p>
</td>
<td class="cellrowborder" valign="top" width="17.11%" headers="mcps1.3.4.2.1.1.2.5.1.2 "><p id="dds_api_0032__p175499101297">No</p>
</td>
<td class="cellrowborder" valign="top" width="18.990000000000002%" headers="mcps1.3.4.2.1.1.2.5.1.3 "><p id="dds_api_0032__p754916107910">String</p>
</td>
<td class="cellrowborder" valign="top" width="42.24%" headers="mcps1.3.4.2.1.1.2.5.1.4 "><p id="dds_api_0032__p42071952164718">Specifies the index position. The query starts from the next piece of data indexed by this parameter.</p>
<ul id="dds_api_0032__ul15995216019"><li id="dds_api_0032__li39911211709">If <strong id="dds_api_0032__b862851011545">action</strong> is set to <strong id="dds_api_0032__b4628201045418">count</strong>, this parameter is not transferred.</li><li id="dds_api_0032__li149915211807">If <strong id="dds_api_0032__b84235270692726">action</strong> is set to <strong id="dds_api_0032__b84235270692731">filter</strong>, this parameter must be a positive integer. The default value is 0, indicating that the query starts from the first piece of data.</li></ul>
</td>
</tr>
<tr id="dds_api_0032__row1098556424"><td class="cellrowborder" valign="top" width="21.66%" headers="mcps1.3.4.2.1.1.2.5.1.1 "><p id="dds_api_0032__p8532141415420">limit</p>
</td>
<td class="cellrowborder" valign="top" width="17.11%" headers="mcps1.3.4.2.1.1.2.5.1.2 "><p id="dds_api_0032__p8536914124211">No</p>
</td>
<td class="cellrowborder" valign="top" width="18.990000000000002%" headers="mcps1.3.4.2.1.1.2.5.1.3 "><p id="dds_api_0032__p6541121417422">String</p>
</td>
<td class="cellrowborder" valign="top" width="42.24%" headers="mcps1.3.4.2.1.1.2.5.1.4 "><p id="dds_api_0032__p1754414146422">Specifies the number of resources to be queried.</p>
<ul id="dds_api_0032__ul1654515148428"><li id="dds_api_0032__li1654781424210">If <strong id="dds_api_0032__b12881225122">action</strong> is set to <strong id="dds_api_0032__b1228819226129">count</strong>, this parameter is not transferred.</li><li id="dds_api_0032__li15549161444213">If <strong id="dds_api_0032__b15506621750">action</strong> is set to <strong id="dds_api_0032__b35060217515">filter</strong>, the value range is from 1 to 100. If this parameter is not transferred, the first 100 DB instances are queried by default.</li></ul>
</td>
</tr>
<tr id="dds_api_0032__row14897175118811"><td class="cellrowborder" valign="top" width="21.66%" headers="mcps1.3.4.2.1.1.2.5.1.1 "><p id="dds_api_0032__p17549010792">action</p>
</td>
<td class="cellrowborder" valign="top" width="17.11%" headers="mcps1.3.4.2.1.1.2.5.1.2 "><p id="dds_api_0032__p195497103918">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="18.990000000000002%" headers="mcps1.3.4.2.1.1.2.5.1.3 "><p id="dds_api_0032__p1554917101690">String</p>
</td>
<td class="cellrowborder" valign="top" width="42.24%" headers="mcps1.3.4.2.1.1.2.5.1.4 "><p id="dds_api_0032__p128118316110">Specifies the operation identifier.</p>
<ul id="dds_api_0032__ul1448585016212"><li id="dds_api_0032__li44851650321">If <strong id="dds_api_0032__b86572718149">action</strong> is set to <strong id="dds_api_0032__b666142713148">filter</strong>, instances are queried by tag filtering criteria.</li><li id="dds_api_0032__li048595010217">If <strong id="dds_api_0032__b7561135561512">action</strong> is set to <strong id="dds_api_0032__b18325931518">count</strong>, only the total number of records is returned.</li></ul>
</td>
</tr>
<tr id="dds_api_0032__row943510150918"><td class="cellrowborder" valign="top" width="21.66%" headers="mcps1.3.4.2.1.1.2.5.1.1 "><p id="dds_api_0032__p177382213918">matches</p>
</td>
<td class="cellrowborder" valign="top" width="17.11%" headers="mcps1.3.4.2.1.1.2.5.1.2 "><p id="dds_api_0032__p107740226915">No</p>
</td>
<td class="cellrowborder" valign="top" width="18.990000000000002%" headers="mcps1.3.4.2.1.1.2.5.1.3 "><p id="dds_api_0032__p51644910576">Array of objects</p>
</td>
<td class="cellrowborder" valign="top" width="42.24%" headers="mcps1.3.4.2.1.1.2.5.1.4 "><p id="dds_api_0032__p63828193116">Specifies the search field.</p>
<ul id="dds_api_0032__ul26011136123310"><li id="dds_api_0032__li260112361339">If the value is left blank, the query is not based on the instance name or instance ID.</li><li id="dds_api_0032__li1860143683310">If the value is not empty, see <a href="#dds_api_0032__table86147511997">Table 4</a>.</li></ul>
</td>
</tr>
<tr id="dds_api_0032__row050933218432"><td class="cellrowborder" valign="top" width="21.66%" headers="mcps1.3.4.2.1.1.2.5.1.1 "><p id="dds_api_0032__p166011049144317">tags</p>
</td>
<td class="cellrowborder" valign="top" width="17.11%" headers="mcps1.3.4.2.1.1.2.5.1.2 "><p id="dds_api_0032__p10605349174312">No</p>
</td>
<td class="cellrowborder" valign="top" width="18.990000000000002%" headers="mcps1.3.4.2.1.1.2.5.1.3 "><p id="dds_api_0032__p839961320582">Array of objects</p>
</td>
<td class="cellrowborder" valign="top" width="42.24%" headers="mcps1.3.4.2.1.1.2.5.1.4 "><p id="dds_api_0032__p1761424915431">Specifies the included tags. Each tag contains a maximum of 20 keys. For more information, see <a href="#dds_api_0032__teb132a9896b14904b643d3159d0c06eb">Table 3</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="dds_api_0032__teb132a9896b14904b643d3159d0c06eb"></a><a name="teb132a9896b14904b643d3159d0c06eb"></a><table cellpadding="4" cellspacing="0" summary="" id="dds_api_0032__teb132a9896b14904b643d3159d0c06eb" frame="border" border="1" rules="all"><caption><b>Table 3 </b>tags field data structure description</caption><thead align="left"><tr id="dds_api_0032__r205f2a4045b24af7bfbe9a7542aa07aa"><th align="left" class="cellrowborder" valign="top" width="21.66%" id="mcps1.3.4.2.1.2.2.5.1.1"><p id="dds_api_0032__ac93bd30b77444614884618eb51b6d66a">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.43%" id="mcps1.3.4.2.1.2.2.5.1.2"><p id="dds_api_0032__aca36c6e0753c4472a37da4fd1a14d498">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.669999999999998%" id="mcps1.3.4.2.1.2.2.5.1.3"><p id="dds_api_0032__ad77f9074312f4e0eb280a9f2053986ac">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="42.24%" id="mcps1.3.4.2.1.2.2.5.1.4"><p id="dds_api_0032__p2069913351452">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dds_api_0032__r46e744ec5f4f42e1b8fbb38ed61fe49b"><td class="cellrowborder" valign="top" width="21.66%" headers="mcps1.3.4.2.1.2.2.5.1.1 "><p id="dds_api_0032__p1891918361090">key</p>
</td>
<td class="cellrowborder" valign="top" width="18.43%" headers="mcps1.3.4.2.1.2.2.5.1.2 "><p id="dds_api_0032__p149196361094">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17.669999999999998%" headers="mcps1.3.4.2.1.2.2.5.1.3 "><p id="dds_api_0032__p1091913361290">String</p>
</td>
<td class="cellrowborder" valign="top" width="42.24%" headers="mcps1.3.4.2.1.2.2.5.1.4 "><p id="dds_api_0032__p29199362919">Specifies the tag key. It contains a maximum of 36 Unicode characters. <strong id="dds_api_0032__b4966554775">key</strong> cannot be empty, an empty string, or spaces. Before using <strong id="dds_api_0032__b1796745416716">key</strong>, delete spaces before and after the value.</p>
<div class="note" id="dds_api_0032__note2051013033811"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="dds_api_0032__p1751163073814">The character set of this parameter is not verified in the search process.</p>
</div></div>
</td>
</tr>
<tr id="dds_api_0032__r4a2647fcd1cd4ffd962c1259e00434a6"><td class="cellrowborder" valign="top" width="21.66%" headers="mcps1.3.4.2.1.2.2.5.1.1 "><p id="dds_api_0032__p189191361491">values</p>
</td>
<td class="cellrowborder" valign="top" width="18.43%" headers="mcps1.3.4.2.1.2.2.5.1.2 "><p id="dds_api_0032__p19196363919">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17.669999999999998%" headers="mcps1.3.4.2.1.2.2.5.1.3 "><p id="dds_api_0032__p8531839155810">Array of strings</p>
</td>
<td class="cellrowborder" valign="top" width="42.24%" headers="mcps1.3.4.2.1.2.2.5.1.4 "><p id="dds_api_0032__p7919143619913">Lists the tag values. Each value contains a maximum of 43 Unicode characters and cannot contain spaces. Before using <strong id="dds_api_0032__b71384591580">values</strong>, delete spaces before and after the value.</p>
<p id="dds_api_0032__p231819201265">If the values are null, it indicates querying any value. The values are in OR relationship.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="dds_api_0032__table86147511997"></a><a name="table86147511997"></a><table cellpadding="4" cellspacing="0" summary="" id="dds_api_0032__table86147511997" frame="border" border="1" rules="all"><caption><b>Table 4 </b>matches field description</caption><thead align="left"><tr id="dds_api_0032__row1061555118918"><th align="left" class="cellrowborder" valign="top" width="21.310000000000002%" id="mcps1.3.4.2.1.3.2.5.1.1"><p id="dds_api_0032__p789596111011">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.3%" id="mcps1.3.4.2.1.3.2.5.1.2"><p id="dds_api_0032__p1189519641016">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.919999999999998%" id="mcps1.3.4.2.1.3.2.5.1.3"><p id="dds_api_0032__p1289516691015">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="42.47%" id="mcps1.3.4.2.1.3.2.5.1.4"><p id="dds_api_0032__p202591039251">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dds_api_0032__row461513515919"><td class="cellrowborder" valign="top" width="21.310000000000002%" headers="mcps1.3.4.2.1.3.2.5.1.1 "><p id="dds_api_0032__p689576151018">key</p>
</td>
<td class="cellrowborder" valign="top" width="18.3%" headers="mcps1.3.4.2.1.3.2.5.1.2 "><p id="dds_api_0032__p5895176161018">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17.919999999999998%" headers="mcps1.3.4.2.1.3.2.5.1.3 "><p id="dds_api_0032__p128951365103">String</p>
</td>
<td class="cellrowborder" valign="top" width="42.47%" headers="mcps1.3.4.2.1.3.2.5.1.4 "><p id="dds_api_0032__p1956923353116">Specifies the query criteria. The value can be <strong id="dds_api_0032__b42292571383">instance_name</strong> or <strong id="dds_api_0032__b13659801697">instance_id</strong>, indicating that the query is based on the instance name or instance ID.</p>
</td>
</tr>
<tr id="dds_api_0032__row16152517911"><td class="cellrowborder" valign="top" width="21.310000000000002%" headers="mcps1.3.4.2.1.3.2.5.1.1 "><p id="dds_api_0032__p168959601018">value</p>
</td>
<td class="cellrowborder" valign="top" width="18.3%" headers="mcps1.3.4.2.1.3.2.5.1.2 "><p id="dds_api_0032__p789511612107">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17.919999999999998%" headers="mcps1.3.4.2.1.3.2.5.1.3 "><p id="dds_api_0032__p158951265104">String</p>
</td>
<td class="cellrowborder" valign="top" width="42.47%" headers="mcps1.3.4.2.1.3.2.5.1.4 "><p id="dds_api_0032__p168956614104">Specifies the name or ID of the DB instance to be matched. You can call the API for querying DB instances to obtain the DB instance name or ID. If you do not have an instance, you can call the API used for creating an instance.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="dds_api_0032__l942697549234470f9e2b41533149c8ab">Example request<p id="dds_api_0032__p13844314167"><a name="dds_api_0032__l942697549234470f9e2b41533149c8ab"></a><a name="l942697549234470f9e2b41533149c8ab"></a>POST https://dds.eu-de.otc.t-systems.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/instances/action</p>
<p id="dds_api_0032__p17483751205610">Query specified DB instances by tag.</p>
<pre class="codeblock" id="dds_api_0032__codeblock1748455115611">{
"offset": "100",
"limit": "100",
"action": "filter",
"matches": [
{
"key": "instance_name",
"value": "test-single"
}
],
"tags": [
{
"key": "key1",
"values": [
"value1",
"value2"
]
}
]
}</pre>
<div class="p" id="dds_api_0032__p14851151175617">Query the total number of resources.<pre class="codeblock" id="dds_api_0032__codeblock1348565120565">{
"action": "count",
"tags": [
{
"key": "key1",
"values": [
"value1",
"value2"
]
},
{
"key": "key2",
"values": [
"value1",
"value2"
]
}
],
"matches": [
{
"key": "instance_name",
"value": "test-single"
},
{
"key": "instance_id",
"value": "958693039f284d6ebfb177375711072ein02"
}
]
}</pre>
</div>
</li></ul>
</div>
<div class="section" id="dds_api_0032__section28521534113742"><h4 class="sectiontitle">Responses</h4><ul id="dds_api_0032__ul12573920"><li id="dds_api_0032__li46056421">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dds_api_0032__table32267243" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Parameter description</caption><thead align="left"><tr id="dds_api_0032__row9230088"><th align="left" class="cellrowborder" valign="top" width="26.547345265473453%" id="mcps1.3.5.2.1.1.2.4.1.1"><p id="dds_api_0032__p9439626">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="26.307369263073692%" id="mcps1.3.5.2.1.1.2.4.1.2"><p id="dds_api_0032__p26412257">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="47.14528547145285%" id="mcps1.3.5.2.1.1.2.4.1.3"><p id="dds_api_0032__p6183114419516">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dds_api_0032__row15736877"><td class="cellrowborder" valign="top" width="26.547345265473453%" headers="mcps1.3.5.2.1.1.2.4.1.1 "><p id="dds_api_0032__p143281286210">instances</p>
</td>
<td class="cellrowborder" valign="top" width="26.307369263073692%" headers="mcps1.3.5.2.1.1.2.4.1.2 "><p id="dds_api_0032__p89898255593">Array of objects</p>
</td>
<td class="cellrowborder" valign="top" width="47.14528547145285%" headers="mcps1.3.5.2.1.1.2.4.1.3 "><p id="dds_api_0032__p105781452119">Indicates the instance list. For details, see <a href="#dds_api_0032__table172571623182113">Table 6</a>.</p>
</td>
</tr>
<tr id="dds_api_0032__row171131639182010"><td class="cellrowborder" valign="top" width="26.547345265473453%" headers="mcps1.3.5.2.1.1.2.4.1.1 "><p id="dds_api_0032__p19328128192115">total_count</p>
</td>
<td class="cellrowborder" valign="top" width="26.307369263073692%" headers="mcps1.3.5.2.1.1.2.4.1.2 "><p id="dds_api_0032__p1657614172114">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="47.14528547145285%" headers="mcps1.3.5.2.1.1.2.4.1.3 "><p id="dds_api_0032__p35791416218">Indicates the total number of queried records.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="dds_api_0032__table172571623182113"></a><a name="table172571623182113"></a><table cellpadding="4" cellspacing="0" summary="" id="dds_api_0032__table172571623182113" frame="border" border="1" rules="all"><caption><b>Table 6 </b>instance field data structure description</caption><thead align="left"><tr id="dds_api_0032__row225812232219"><th align="left" class="cellrowborder" valign="top" width="26.762676267626762%" id="mcps1.3.5.2.1.2.2.4.1.1"><p id="dds_api_0032__p650312482215">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="26.232623262326232%" id="mcps1.3.5.2.1.2.2.4.1.2"><p id="dds_api_0032__p15506114820214">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="47.004700470047%" id="mcps1.3.5.2.1.2.2.4.1.3"><p id="dds_api_0032__p1565315461356">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dds_api_0032__row1525992322120"><td class="cellrowborder" valign="top" width="26.762676267626762%" headers="mcps1.3.5.2.1.2.2.4.1.1 "><p id="dds_api_0032__p1080817301218">instance_id</p>
</td>
<td class="cellrowborder" valign="top" width="26.232623262326232%" headers="mcps1.3.5.2.1.2.2.4.1.2 "><p id="dds_api_0032__p9131636122116">String</p>
</td>
<td class="cellrowborder" valign="top" width="47.004700470047%" headers="mcps1.3.5.2.1.2.2.4.1.3 "><p id="dds_api_0032__p341442152117">Indicates the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance.</p>
</td>
</tr>
<tr id="dds_api_0032__row6259182312215"><td class="cellrowborder" valign="top" width="26.762676267626762%" headers="mcps1.3.5.2.1.2.2.4.1.1 "><p id="dds_api_0032__p1480812301211">instance_name</p>
</td>
<td class="cellrowborder" valign="top" width="26.232623262326232%" headers="mcps1.3.5.2.1.2.2.4.1.2 "><p id="dds_api_0032__p15134361216">String</p>
</td>
<td class="cellrowborder" valign="top" width="47.004700470047%" headers="mcps1.3.5.2.1.2.2.4.1.3 "><p id="dds_api_0032__p241194219213">Indicates the DB instance name.</p>
</td>
</tr>
<tr id="dds_api_0032__row1125972316217"><td class="cellrowborder" valign="top" width="26.762676267626762%" headers="mcps1.3.5.2.1.2.2.4.1.1 "><p id="dds_api_0032__p080873020213">tags</p>
</td>
<td class="cellrowborder" valign="top" width="26.232623262326232%" headers="mcps1.3.5.2.1.2.2.4.1.2 "><p id="dds_api_0032__p3403103710595">Array of objects</p>
</td>
<td class="cellrowborder" valign="top" width="47.004700470047%" headers="mcps1.3.5.2.1.2.2.4.1.3 "><p id="dds_api_0032__p1941174214213">Indicates the tag list. If there is no tag in the list, <strong id="dds_api_0032__b84235270620128">tags</strong> is taken as an empty array. For more information, see <a href="#dds_api_0032__table42343062217">Table 7</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="dds_api_0032__table42343062217"></a><a name="table42343062217"></a><table cellpadding="4" cellspacing="0" summary="" id="dds_api_0032__table42343062217" frame="border" border="1" rules="all"><caption><b>Table 7 </b>tags field data structure description</caption><thead align="left"><tr id="dds_api_0032__row1734193014229"><th align="left" class="cellrowborder" valign="top" width="26.762676267626762%" id="mcps1.3.5.2.1.3.2.4.1.1"><p id="dds_api_0032__p163743016222">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="26.232623262326232%" id="mcps1.3.5.2.1.3.2.4.1.2"><p id="dds_api_0032__p140183042211">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="47.004700470047%" id="mcps1.3.5.2.1.3.2.4.1.3"><p id="dds_api_0032__p6887151558">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dds_api_0032__row10471030142217"><td class="cellrowborder" valign="top" width="26.762676267626762%" headers="mcps1.3.5.2.1.3.2.4.1.1 "><p id="dds_api_0032__p91761847152218">key</p>
</td>
<td class="cellrowborder" valign="top" width="26.232623262326232%" headers="mcps1.3.5.2.1.3.2.4.1.2 "><p id="dds_api_0032__p85333016226">String</p>
</td>
<td class="cellrowborder" valign="top" width="47.004700470047%" headers="mcps1.3.5.2.1.3.2.4.1.3 "><p id="dds_api_0032__p18811053162216">Indicates the tag key. The value contains 36 Unicode characters and cannot be blank.</p>
<p id="dds_api_0032__p28901137142810">Character set: 0-9, A-Z, a-z, "_", "-", and "@".</p>
</td>
</tr>
<tr id="dds_api_0032__row14593303229"><td class="cellrowborder" valign="top" width="26.762676267626762%" headers="mcps1.3.5.2.1.3.2.4.1.1 "><p id="dds_api_0032__p4176164720221">value</p>
</td>
<td class="cellrowborder" valign="top" width="26.232623262326232%" headers="mcps1.3.5.2.1.3.2.4.1.2 "><p id="dds_api_0032__p126417302222">String</p>
</td>
<td class="cellrowborder" valign="top" width="47.004700470047%" headers="mcps1.3.5.2.1.3.2.4.1.3 "><p id="dds_api_0032__p1260123813161">Indicates the tag value. The value contains a maximum of 43 Unicode characters and can also be an empty string.</p>
<p id="dds_api_0032__p144961912132510">Character set: 0-9, A-Z, a-z, "_", "-", and "@".</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="dds_api_0032__ul16665627"><li id="dds_api_0032__li15772917">Response example<p id="dds_api_0032__p18623181615230"><a name="dds_api_0032__li15772917"></a><a name="li15772917"></a>1. Return specified DB instances by tag.</p>
<pre class="codeblock" id="dds_api_0032__codeblock660937479172">{
"instances": [
{
"instance_id": "2acbf2223caf3bac3c33c6153423c3ccin02",
"instance_name": "test-single",
"tags": [
{
"key": "key1",
"value": "value1"
},
{
"key": "key2",
"value": "value1"
}
]
}
]
}</pre>
<p id="dds_api_0032__p162456581710"></p>
<p id="dds_api_0032__p1816702852311">2. Number of returned records.</p>
<pre class="codeblock" id="dds_api_0032__codeblock627552312315">{
"total_count": 4
}</pre>
</li></ul>
</div>
<div class="section" id="dds_api_0032__section5382712154838"><h4 class="sectiontitle">Status Code</h4><p id="dds_api_0032__dds_api_0018_p16131712193312">Status Code:200.</p>
<p id="dds_api_0032__dds_api_0018_p480617135329">For more information, see <a href="dds_status_code.html">Status Code</a>.</p>
</div>
<div class="section" id="dds_api_0032__section6522193710339"><h4 class="sectiontitle">Error Code</h4><p id="dds_api_0032__dds_api_0018_p20466124120334">For more information, see <a href="dds_error_code.html">Error Code</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dds_tag_mgmt.html">Tag Management</a></div>
</div>
</div>