doc-exports/docs/natgw/api-ref/nat_api_0021.html
Qin Ying, Fan 388d58fc5d NATGW API 20230922 version
Reviewed-by: Sarda, Priya <prsarda@noreply.gitea.eco.tsi-dev.otc-service.com>
Co-authored-by: Qin Ying, Fan <fanqinying@huawei.com>
Co-committed-by: Qin Ying, Fan <fanqinying@huawei.com>
2024-01-16 14:31:30 +00:00

122 lines
7.8 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="nat_api_0021"></a><a name="nat_api_0021"></a>
<h1 class="topictitle1">Querying Tags in a Project</h1>
<div id="body1527752513950"><div class="section" id="nat_api_0021__section13772253714"><h4 class="sectiontitle">Function</h4><p id="nat_api_0021__p11770422153714">This API is used to query all tags of a resource type in a specified region.</p>
<p id="nat_api_0021__p377012253712">TMS uses this API to list tags created by a tenant to facilitate tag creation and resource filtering on the console.</p>
</div>
<div class="section" id="nat_api_0021__section240322193716"><h4 class="sectiontitle">URI</h4><p id="nat_api_0021__p1367413510429">GET /v2.0/{project_id}/nat_gateways/tags</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="nat_api_0021__table666822193713" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="nat_api_0021__row877222283719"><th align="left" class="cellrowborder" valign="top" width="20.31%" id="mcps1.3.2.3.2.5.1.1"><p id="nat_api_0021__p624815530312">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="24.5%" id="mcps1.3.2.3.2.5.1.2"><p id="nat_api_0021__p1936450184812">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.7%" id="mcps1.3.2.3.2.5.1.3"><p id="nat_api_0021__p15018439484">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="39.489999999999995%" id="mcps1.3.2.3.2.5.1.4"><p id="nat_api_0021__p1124817538319">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="nat_api_0021__row187731822143718"><td class="cellrowborder" valign="top" width="20.31%" headers="mcps1.3.2.3.2.5.1.1 "><p id="nat_api_0021__p7773322173719">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="24.5%" headers="mcps1.3.2.3.2.5.1.2 "><p id="nat_api_0021__p194197238513">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="15.7%" headers="mcps1.3.2.3.2.5.1.3 "><p id="nat_api_0021__p3587192012519">String</p>
</td>
<td class="cellrowborder" valign="top" width="39.489999999999995%" headers="mcps1.3.2.3.2.5.1.4 "><p id="nat_api_0021__p127731822103710">Specifies the project ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="nat_api_0021__section191162214370"><h4 class="sectiontitle">Request</h4><p id="nat_api_0021__p177422243720">None</p>
</div>
<div class="section" id="nat_api_0021__section293112210378"><h4 class="sectiontitle">Response</h4><p id="nat_api_0021__p13582185294219"><a href="#nat_api_0021__table4116222183715">Table 2</a> lists response parameters.</p>
<div class="tablenoborder"><a name="nat_api_0021__table4116222183715"></a><a name="table4116222183715"></a><table cellpadding="4" cellspacing="0" summary="" id="nat_api_0021__table4116222183715" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response parameters</caption><thead align="left"><tr id="nat_api_0021__row11774122219376"><th align="left" class="cellrowborder" valign="top" width="20.75%" id="mcps1.3.4.3.2.5.1.1"><p id="nat_api_0021__p190923422617">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25.6%" id="mcps1.3.4.3.2.5.1.2"><p id="nat_api_0021__p1190973411267">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.51%" id="mcps1.3.4.3.2.5.1.3"><p id="nat_api_0021__p1790933415263">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40.14%" id="mcps1.3.4.3.2.5.1.4"><p id="nat_api_0021__p890910343263">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="nat_api_0021__row1774102263717"><td class="cellrowborder" valign="top" width="20.75%" headers="mcps1.3.4.3.2.5.1.1 "><p id="nat_api_0021__p16774622183720">tags</p>
</td>
<td class="cellrowborder" valign="top" width="25.6%" headers="mcps1.3.4.3.2.5.1.2 "><p id="nat_api_0021__p31348314512">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="13.51%" headers="mcps1.3.4.3.2.5.1.3 "><p id="nat_api_0021__p17471928105115">Array</p>
</td>
<td class="cellrowborder" valign="top" width="40.14%" headers="mcps1.3.4.3.2.5.1.4 "><p id="nat_api_0021__p117759224377">Specifies tags.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="nat_api_0021__table101671522163719" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Parameter description of field <strong id="nat_api_0021__b764414410711">tags</strong></caption><thead align="left"><tr id="nat_api_0021__row77752226370"><th align="left" class="cellrowborder" valign="top" width="21.27%" id="mcps1.3.4.4.2.5.1.1"><p id="nat_api_0021__p105532368267">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="24.85%" id="mcps1.3.4.4.2.5.1.2"><p id="nat_api_0021__p55534362269">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.74%" id="mcps1.3.4.4.2.5.1.3"><p id="nat_api_0021__p5553193642613">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40.14%" id="mcps1.3.4.4.2.5.1.4"><p id="nat_api_0021__p655333662614">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="nat_api_0021__row577692219376"><td class="cellrowborder" valign="top" width="21.27%" headers="mcps1.3.4.4.2.5.1.1 "><p id="nat_api_0021__p12776022173714">key</p>
</td>
<td class="cellrowborder" valign="top" width="24.85%" headers="mcps1.3.4.4.2.5.1.2 "><p id="nat_api_0021__p638411537512">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="13.74%" headers="mcps1.3.4.4.2.5.1.3 "><p id="nat_api_0021__p64471248145119">String</p>
</td>
<td class="cellrowborder" valign="top" width="40.14%" headers="mcps1.3.4.4.2.5.1.4 "><p id="nat_api_0021__p37763220373">Specifies the tag key. It contains a maximum of 36 Unicode characters. It cannot be left empty or contain ASCII characters (031) and the following special characters: *&lt;&gt;\=</p>
</td>
</tr>
<tr id="nat_api_0021__row677602211373"><td class="cellrowborder" valign="top" width="21.27%" headers="mcps1.3.4.4.2.5.1.1 "><p id="nat_api_0021__p1177712253717">values</p>
</td>
<td class="cellrowborder" valign="top" width="24.85%" headers="mcps1.3.4.4.2.5.1.2 "><p id="nat_api_0021__p87775228377">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="13.74%" headers="mcps1.3.4.4.2.5.1.3 "><p id="nat_api_0021__p044816482511">Array&lt;String&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="40.14%" headers="mcps1.3.4.4.2.5.1.4 "><p id="nat_api_0021__p07775228370">Specifies the tag values. The value can contain a maximum of 43 Unicode characters and can be an empty string. It cannot contain non-printable ASCII characters (031) or the following special characters: *&lt;&gt;\=</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="nat_api_0021__section15248112218372"><h4 class="sectiontitle">Examples</h4><ul id="nat_api_0021__ul880963410439"><li id="nat_api_0021__li48093344439">Example request<pre class="screen" id="nat_api_0021__screen15777172223718">GET https://{VPC_endpoint}/v2.0/9ad601814ac94c80bf7bb9073ded66fc/nat_gateways/tags</pre>
</li></ul>
</div>
<ul id="nat_api_0021__ul596844924312"><li id="nat_api_0021__li1796810495431">Example response<pre class="screen" id="nat_api_0021__screen86721312445">{
"tags": [
{
"key": "key1",
"values": [
"value1",
"value2"
]
},
{
"key": "key2",
"values": [
"value3",
"value4"
]
}
]
}</pre>
</li></ul>
<div class="section" id="nat_api_0021__section16337322173718"><h4 class="sectiontitle">Status Code</h4><p id="nat_api_0021__p15779152253713">See <a href="nat_api_0038.html">Status Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="nat_api_0015.html">Tags</a></div>
</div>
</div>