forked from docs/doc-exports
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>
122 lines
8.7 KiB
HTML
122 lines
8.7 KiB
HTML
<a name="nat_api_0018"></a><a name="nat_api_0018"></a>
|
|
|
|
<h1 class="topictitle1">Adding a NAT Gateway Tag</h1>
|
|
<div id="body1527752448619"><div class="section" id="nat_api_0018__section11511053103113"><h4 class="sectiontitle">Function</h4><p id="nat_api_0018__p15247195316317">This API is used to add tags to a NAT gateway. You can add a maximum of 20 tags to a NAT gateway.</p>
|
|
<p id="nat_api_0018__p824775313113">This API is idempotent.</p>
|
|
<p id="nat_api_0018__p112471553173112">If a to-be-created tag has the same key as an existing tag, the tag will be created and overwrite the existing one.</p>
|
|
<div class="note" id="nat_api_0018__note1928288568"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="nat_api_0018__p92821580614">Ensure that the NAT gateway which you add the tag to exists.</p>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="nat_api_0018__section1253195318312"><h4 class="sectiontitle">URI</h4><p id="nat_api_0018__p77733281153">POST /v2.0/{project_id}/nat_gateways/{nat_gateway_id}/tags</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="nat_api_0018__table765205363118" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="nat_api_0018__row1124855319317"><th align="left" class="cellrowborder" valign="top" width="24.93249324932493%" id="mcps1.3.2.3.2.5.1.1"><p id="nat_api_0018__p624815530312">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="24.062406240624064%" id="mcps1.3.2.3.2.5.1.2"><p id="nat_api_0018__p1936450184812">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20.932093209320936%" id="mcps1.3.2.3.2.5.1.3"><p id="nat_api_0018__p15018439484">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="30.073007300730076%" id="mcps1.3.2.3.2.5.1.4"><p id="nat_api_0018__p1124817538319">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="nat_api_0018__row6248195373120"><td class="cellrowborder" valign="top" width="24.93249324932493%" headers="mcps1.3.2.3.2.5.1.1 "><p id="nat_api_0018__p124819531317">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.062406240624064%" headers="mcps1.3.2.3.2.5.1.2 "><p id="nat_api_0018__p4368507484">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.932093209320936%" headers="mcps1.3.2.3.2.5.1.3 "><p id="nat_api_0018__p1850174324816">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="30.073007300730076%" headers="mcps1.3.2.3.2.5.1.4 "><p id="nat_api_0018__p624915534319">Specifies the project ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="nat_api_0018__row0249135363119"><td class="cellrowborder" valign="top" width="24.93249324932493%" headers="mcps1.3.2.3.2.5.1.1 "><p id="nat_api_0018__p20249853193114">nat_gateway_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.062406240624064%" headers="mcps1.3.2.3.2.5.1.2 "><p id="nat_api_0018__p15427752134810">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.932093209320936%" headers="mcps1.3.2.3.2.5.1.3 "><p id="nat_api_0018__p3501643104811">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="30.073007300730076%" headers="mcps1.3.2.3.2.5.1.4 "><p id="nat_api_0018__p192491653173113">Specifies the NAT gateway ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="nat_api_0018__section480153123112"><h4 class="sectiontitle">Request</h4><p id="nat_api_0018__p15259175817614"><a href="#nat_api_0018__table78225323114">Table 2</a> describes the request parameters.</p>
|
|
|
|
<div class="tablenoborder"><a name="nat_api_0018__table78225323114"></a><a name="table78225323114"></a><table cellpadding="4" cellspacing="0" summary="" id="nat_api_0018__table78225323114" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request parameters</caption><thead align="left"><tr id="nat_api_0018__row0250135313313"><th align="left" class="cellrowborder" valign="top" width="25.369999999999997%" id="mcps1.3.3.3.2.5.1.1"><p id="nat_api_0018__p411518108265">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="23.189999999999998%" id="mcps1.3.3.3.2.5.1.2"><p id="nat_api_0018__p811571012267">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20.52%" id="mcps1.3.3.3.2.5.1.3"><p id="nat_api_0018__p5115181010265">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="30.919999999999998%" id="mcps1.3.3.3.2.5.1.4"><p id="nat_api_0018__p121151110112612">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="nat_api_0018__row192511853193116"><td class="cellrowborder" valign="top" width="25.369999999999997%" headers="mcps1.3.3.3.2.5.1.1 "><p id="nat_api_0018__p12511353143113">tag</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.189999999999998%" headers="mcps1.3.3.3.2.5.1.2 "><p id="nat_api_0018__p1789762024914">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.52%" headers="mcps1.3.3.3.2.5.1.3 "><p id="nat_api_0018__p1846718102818">Array</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="30.919999999999998%" headers="mcps1.3.3.3.2.5.1.4 "><p id="nat_api_0018__p132519531318">Specifies the list of tags.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="nat_api_0018__table191175318319" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Description of field <strong id="nat_api_0018__b84235270695528">tag</strong></caption><thead align="left"><tr id="nat_api_0018__row1251653113118"><th align="left" class="cellrowborder" valign="top" width="25.63256325632563%" id="mcps1.3.3.4.2.5.1.1"><p id="nat_api_0018__p12113181313266">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="22.84228422842284%" id="mcps1.3.3.4.2.5.1.2"><p id="nat_api_0018__p1511310131266">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="9.12091209120912%" id="mcps1.3.3.4.2.5.1.3"><p id="nat_api_0018__p18113013182612">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="42.404240424042406%" id="mcps1.3.3.4.2.5.1.4"><p id="nat_api_0018__p1711315139267">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="nat_api_0018__row72513535318"><td class="cellrowborder" valign="top" width="25.63256325632563%" headers="mcps1.3.3.4.2.5.1.1 "><p id="nat_api_0018__p3251195363114">key</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22.84228422842284%" headers="mcps1.3.3.4.2.5.1.2 "><p id="nat_api_0018__p184391343144913">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.12091209120912%" headers="mcps1.3.3.4.2.5.1.3 "><p id="nat_api_0018__p1655263974910">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="42.404240424042406%" headers="mcps1.3.3.4.2.5.1.4 "><p id="nat_api_0018__p13251155363117">Specifies the tag key. It contains a maximum of 36 Unicode characters. This parameter cannot be left blank or contain ASCII (0-31) or the following characters: =*<>\,|/</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="nat_api_0018__row925145318314"><td class="cellrowborder" valign="top" width="25.63256325632563%" headers="mcps1.3.3.4.2.5.1.1 "><p id="nat_api_0018__p11251105313117">value</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22.84228422842284%" headers="mcps1.3.3.4.2.5.1.2 "><p id="nat_api_0018__p0439443194919">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.12091209120912%" headers="mcps1.3.3.4.2.5.1.3 "><p id="nat_api_0018__p955233911497">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="42.404240424042406%" headers="mcps1.3.3.4.2.5.1.4 "><p id="nat_api_0018__p102511153193119">Specifies the key value. The value can contain a maximum of 43 Unicode characters and can be an empty string. It cannot contain ASCII (0-31) or the following characters: =*<>\,|/</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="nat_api_0018__section810735303119"><h4 class="sectiontitle">Response</h4><p id="nat_api_0018__p725118538315">None</p>
|
|
</div>
|
|
<div class="section" id="nat_api_0018__section1910795303111"><h4 class="sectiontitle">Examples</h4><ul id="nat_api_0018__ul26581544171"><li id="nat_api_0018__li865854418712">Example request<pre class="screen" id="nat_api_0018__screen1325215319315">POST https://{VPC_endpoint}/v2.0/9ad601814ac94c80bf7bb9073ded66fc/nat_gateways/fe1a4cf0-27fe-4b97-a9b1-2c67c127f0e0/tags
|
|
{
|
|
"tag":
|
|
{
|
|
"key":"key1",
|
|
"value":"value1"
|
|
}
|
|
}</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="nat_api_0018__section6116753133111"><h4 class="sectiontitle">Status Code</h4><p id="nat_api_0018__p11253115383112">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>
|
|
|