forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Wang , Deng Ke <wangdengke2@huawei.com> Co-committed-by: Wang , Deng Ke <wangdengke2@huawei.com>
137 lines
11 KiB
HTML
137 lines
11 KiB
HTML
<a name="rds_06_0037"></a><a name="rds_06_0037"></a>
|
|
|
|
<h1 class="topictitle1">Adding Tags in Batches</h1>
|
|
<div id="body1574061742130"><div class="section" id="rds_06_0037__section61759636"><h4 class="sectiontitle">Function</h4><p id="rds_06_0037__p33831530">This API is used to add tags in batches.</p>
|
|
<ul id="rds_06_0037__ul12259155218373"><li id="rds_06_0037__en-us_topic_0240111818_li836513175363">Before calling an API, you need to understand the API in <a href="rds_03_0001.html">Authentication</a>.</li><li id="rds_06_0037__en-us_topic_0240111818_li1991981933613">Before calling this API, obtain the required <a href="https://docs.otc.t-systems.com/en-us/endpoint/index.html" target="_blank" rel="noopener noreferrer">region and endpoint</a>.</li></ul>
|
|
</div>
|
|
<div class="section" id="rds_06_0037__section18965813"><h4 class="sectiontitle">URI</h4><ul id="rds_06_0037__ul13194498"><li id="rds_06_0037__li41603465301">URI format<p id="rds_06_0037__p11160246123012"><a name="rds_06_0037__li41603465301"></a><a name="li41603465301"></a>POST https://{<em id="rds_06_0037__i11252164981618">Endpoint</em>}/v3/{project_id}/instances/{instance_id}/tags/action</p>
|
|
</li></ul>
|
|
<ul id="rds_06_0037__ul55999443"><li id="rds_06_0037__li21405046">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_06_0037__table65777232" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="rds_06_0037__row46529701"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.3.1.1.2.4.1.1"><p id="rds_06_0037__p10809459"><strong id="rds_06_0037__b1768014488532">Name</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.3.1.1.2.4.1.2"><p id="rds_06_0037__p3150961"><strong id="rds_06_0037__b28871352145316">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.3.1.1.2.4.1.3"><p id="rds_06_0037__p53901255"><strong id="rds_06_0037__b1881015345310">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="rds_06_0037__row3925534"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.3.1.1.2.4.1.1 "><p id="rds_06_0037__p49532829">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.3.1.1.2.4.1.2 "><p id="rds_06_0037__p52736237">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.3.1.1.2.4.1.3 "><p id="rds_06_0037__p43776822">Specifies the project ID of a tenant in a region.</p>
|
|
<p id="rds_06_0037__p186761044260">For details about how to obtain the project ID, see <a href="rds_03_0002.html">Obtaining a Project ID</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_06_0037__row19780235152911"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.3.1.1.2.4.1.1 "><p id="rds_06_0037__p41557789155220">instance_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.3.1.1.2.4.1.2 "><p id="rds_06_0037__p10737742155220">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.3.1.1.2.4.1.3 "><p id="rds_06_0037__p64450739155220">Specifies the DB instance ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="rds_06_0037__section36474591"><h4 class="sectiontitle">Request</h4><ul id="rds_06_0037__ul1677317341210"><li id="rds_06_0037__li1830813567439">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_06_0037__table6426756154514" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="rds_06_0037__row142645664510"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.1.1.2.5.1.1"><p id="rds_06_0037__p17490046"><strong id="rds_06_0037__b646061005419">Name</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="21%" id="mcps1.3.3.2.1.1.2.5.1.2"><p id="rds_06_0037__p7407659"><strong id="rds_06_0037__b32141511185414">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.1.1.2.5.1.3"><p id="rds_06_0037__p63149496"><strong id="rds_06_0037__b141221012205416">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="39%" id="mcps1.3.3.2.1.1.2.5.1.4"><p id="rds_06_0037__p14835533"><strong id="rds_06_0037__b168441314540">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="rds_06_0037__row173801487266"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="rds_06_0037__p43811862612">action</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="rds_06_0037__p1438198172618">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="rds_06_0037__p1638119872613">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="rds_06_0037__p1838118162611">Specifies the operation identifier (case sensitive), which is <strong id="rds_06_0037__b842352706163653">create</strong> during the creation operation.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_06_0037__row34264566458"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="rds_06_0037__p1965465321213">tags</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="rds_06_0037__p60181840">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="rds_06_0037__p46861368136">Array of objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="rds_06_0037__p185214553212">Specifies the tag list. A maximum of 20 tags can be added for each DB instance.</p>
|
|
<p id="rds_06_0037__p5209639171915">For details, see <a href="#rds_06_0037__table9331195513220">Table 3</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="rds_06_0037__table9331195513220"></a><a name="table9331195513220"></a><table cellpadding="4" cellspacing="0" summary="" id="rds_06_0037__table9331195513220" frame="border" border="1" rules="all"><caption><b>Table 3 </b>tags field data structure description</caption><thead align="left"><tr id="rds_06_0037__row1233225516327"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.1.2.2.5.1.1"><p id="rds_06_0037__p13321055143210"><strong id="rds_06_0037__b387951011565">Name</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="21%" id="mcps1.3.3.2.1.2.2.5.1.2"><p id="rds_06_0037__p233215511328"><strong id="rds_06_0037__b28131611155615">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.1.2.2.5.1.3"><p id="rds_06_0037__p14332655113212"><strong id="rds_06_0037__b998651216562">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="39%" id="mcps1.3.3.2.1.2.2.5.1.4"><p id="rds_06_0037__p15332055113219"><strong id="rds_06_0037__b09821313135611">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="rds_06_0037__row1433205523210"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.1.2.2.5.1.1 "><p id="rds_06_0037__p163321755133220">key</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.3.2.1.2.2.5.1.2 "><p id="rds_06_0037__p3332105563215">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.1.2.2.5.1.3 "><p id="rds_06_0037__p1433215593211">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39%" headers="mcps1.3.3.2.1.2.2.5.1.4 "><p id="rds_06_0037__p2830124210469">Specifies the tag key, which contains a maximum of 36 Unicode characters.</p>
|
|
<p id="rds_06_0037__p198302428468">The key cannot be left blank or an empty string. It can be any of Unicode characters (\u4E00-\u9FFF) or the following character set: A-Z, a-z, 0-9, hyphens (-), underscores (_), and at sighs (@).</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_06_0037__row103322555324"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.1.2.2.5.1.1 "><p id="rds_06_0037__p67321750123411">value</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.3.2.1.2.2.5.1.2 "><p id="rds_06_0037__p53329558326">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.1.2.2.5.1.3 "><p id="rds_06_0037__p6332855193216">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39%" headers="mcps1.3.3.2.1.2.2.5.1.4 "><p id="rds_06_0037__p1298613547464">Specifies the tag value, which contains a maximum of 43 Unicode characters.</p>
|
|
<p id="rds_06_0037__p16986254144615">It can be any of Unicode characters (\u4E00-\u9FFF) or the following character set: A-Z, a-z, 0-9, hyphens (-), underscores (_), and at signs (@).</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
<ul id="rds_06_0037__ul14221437241"><li id="rds_06_0037__li4411135064210">Example<p id="rds_06_0037__p1454414211213"><a name="rds_06_0037__li4411135064210"></a><a name="li4411135064210"></a>POST https://rds.eu-de.otc.t-systems.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/cee5265e1e5845649e354841234567dfin01/tags/action</p>
|
|
</li></ul>
|
|
<ul id="rds_06_0037__ul1695816508411"><li id="rds_06_0037__li69581950549">Request example<pre class="codeblock" id="rds_06_0037__codeblock139581150142">{
|
|
"action": "create",
|
|
"tags": [{
|
|
"key": "key1",
|
|
"value": "value1"
|
|
}, {
|
|
"key": "key2",
|
|
"value": "value2"
|
|
}]
|
|
}</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="rds_06_0037__section59835867"><h4 class="sectiontitle">Response</h4><ul id="rds_06_0037__ul396612717394"><li id="rds_06_0037__li49661427193912">Normal Response<p id="rds_06_0037__p824011811104"><a name="rds_06_0037__li49661427193912"></a><a name="li49661427193912"></a>None</p>
|
|
</li><li id="rds_06_0037__li8200143916396">Abnormal Response<p id="rds_06_0037__p29415884"><a name="rds_06_0037__li8200143916396"></a><a name="li8200143916396"></a>For details, see <a href="en-us_topic_0032488197.html">Abnormal Request Results</a>.</p>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="rds_06_0037__section4778540915440"><h4 class="sectiontitle">Status Code</h4><ul id="rds_06_0037__en-us_topic_0032347778_ul7858132212142"><li id="rds_06_0037__en-us_topic_0032347778_li58581622171411">Normal<p id="rds_06_0037__en-us_topic_0032347778_p1040982941020"><a name="rds_06_0037__en-us_topic_0032347778_li58581622171411"></a><a name="en-us_topic_0032347778_li58581622171411"></a>200</p>
|
|
</li><li id="rds_06_0037__en-us_topic_0032347778_li11583183218149">Abnormal<p id="rds_06_0037__en-us_topic_0032347778_p0723374409"><a name="rds_06_0037__en-us_topic_0032347778_li11583183218149"></a><a name="en-us_topic_0032347778_li11583183218149"></a>For details, see <a href="en-us_topic_0032488240.html">Status Codes</a>.</p>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="rds_06_0037__section1183074220016"><h4 class="sectiontitle">Error Code</h4><p id="rds_06_0037__en-us_topic_0032347778_p19357163913406">For details, see <a href="en-us_topic_0032488241.html">Error Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rds_06_0036.html">Tag Management</a></div>
|
|
</div>
|
|
</div>
|
|
|