forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Zheng, Xiu <zhengxiu@huawei.com> Co-committed-by: Zheng, Xiu <zhengxiu@huawei.com>
131 lines
9.9 KiB
HTML
131 lines
9.9 KiB
HTML
<a name="css_03_0083"></a><a name="css_03_0083"></a>
|
|
|
|
<h1 class="topictitle1">Adding Tags to a Cluster</h1>
|
|
<div id="body1602657069480"><div class="section" id="css_03_0083__section5775105216322"><h4 class="sectiontitle">Function</h4><p id="css_03_0083__p7334184903818">This API is used to add tags to a cluster. A cluster can have a maximum of 10 tags.</p>
|
|
</div>
|
|
<div class="section" id="css_03_0083__section85901833113319"><h4 class="sectiontitle">URI</h4><pre class="screen" id="css_03_0083__screen157372512456">POST /v1.0/{project_id}/css-cluster/{cluster_id}/tags</pre>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="css_03_0083__table2051364645814" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameters</caption><thead align="left"><tr id="css_03_0083__row1513164620582"><th align="left" class="cellrowborder" valign="top" width="21.349999999999998%" id="mcps1.3.2.3.2.5.1.1"><p id="css_03_0083__p10513184619585">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="24.73%" id="mcps1.3.2.3.2.5.1.2"><p id="css_03_0083__p65131346165815">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="22.259999999999998%" id="mcps1.3.2.3.2.5.1.3"><p id="css_03_0083__p165131466586">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="31.66%" id="mcps1.3.2.3.2.5.1.4"><p id="css_03_0083__p751310467588">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="css_03_0083__row20513746145810"><td class="cellrowborder" valign="top" width="21.349999999999998%" headers="mcps1.3.2.3.2.5.1.1 "><p id="css_03_0083__p175131646165817">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.73%" headers="mcps1.3.2.3.2.5.1.2 "><p id="css_03_0083__p651410466581">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22.259999999999998%" headers="mcps1.3.2.3.2.5.1.3 "><p id="css_03_0083__p115141546165810">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="31.66%" headers="mcps1.3.2.3.2.5.1.4 "><p id="css_03_0083__p251414460586">Project ID</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="css_03_0083__row17514184616581"><td class="cellrowborder" valign="top" width="21.349999999999998%" headers="mcps1.3.2.3.2.5.1.1 "><p id="css_03_0083__p751434620586">cluster_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.73%" headers="mcps1.3.2.3.2.5.1.2 "><p id="css_03_0083__p4514746115818">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22.259999999999998%" headers="mcps1.3.2.3.2.5.1.3 "><p id="css_03_0083__p8514346125816">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="31.66%" headers="mcps1.3.2.3.2.5.1.4 "><p id="css_03_0083__p1451404617581">ID of the cluster to which a tag is to be added</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="css_03_0083__section913584663318"><h4 class="sectiontitle">Request</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="css_03_0083__table87961614104012" frame="border" border="1" rules="all"><caption><b>Table 2 </b><strong id="css_03_0083__b136432017124">tag</strong> field description</caption><thead align="left"><tr id="css_03_0083__row1850131415405"><th align="left" class="cellrowborder" valign="top" width="16.14838516148385%" id="mcps1.3.3.2.2.5.1.1"><p id="css_03_0083__p1285091413406">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="16.14838516148385%" id="mcps1.3.3.2.2.5.1.2"><p id="css_03_0083__p6850111474015">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.51824817518248%" id="mcps1.3.3.2.2.5.1.3"><p id="css_03_0083__p1985041419403">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50.18498150184981%" id="mcps1.3.3.2.2.5.1.4"><p id="css_03_0083__p3850201420406">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="css_03_0083__row485010149403"><td class="cellrowborder" valign="top" width="16.14838516148385%" headers="mcps1.3.3.2.2.5.1.1 "><p id="css_03_0083__p1685031414409">key</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.14838516148385%" headers="mcps1.3.3.2.2.5.1.2 "><p id="css_03_0083__p18850161414010">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.51824817518248%" headers="mcps1.3.3.2.2.5.1.3 "><p id="css_03_0083__p118501714104016">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.18498150184981%" headers="mcps1.3.3.2.2.5.1.4 "><p id="css_03_0083__p176851121143816">Tag key. The value can contain up to 36 characters.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="css_03_0083__row48501514134018"><td class="cellrowborder" valign="top" width="16.14838516148385%" headers="mcps1.3.3.2.2.5.1.1 "><p id="css_03_0083__p1685011414019">value</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.14838516148385%" headers="mcps1.3.3.2.2.5.1.2 "><p id="css_03_0083__p485019145403">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.51824817518248%" headers="mcps1.3.3.2.2.5.1.3 "><p id="css_03_0083__p19850161419407">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.18498150184981%" headers="mcps1.3.3.2.2.5.1.4 "><p id="css_03_0083__p163215433176">Tag value. The value contains up to 43 characters.</p>
|
|
<p id="css_03_0083__p116851821153813">If <span class="parmname" id="css_03_0083__parmname16134518361120"><b>value</b></span> is not empty, delete tags by <span class="parmname" id="css_03_0083__parmname10337530941120"><b>key</b></span>/<span class="parmname" id="css_03_0083__parmname21218268621120"><b>value</b></span>. If <span class="parmname" id="css_03_0083__parmname20685340191120"><b>value</b></span> is empty, delete tags by <span class="parmname" id="css_03_0083__parmname18416636521120"><b>key</b></span>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="css_03_0083__section178625213413"><h4 class="sectiontitle">Response</h4><p id="css_03_0083__p198127733419">None</p>
|
|
</div>
|
|
<div class="section" id="css_03_0083__section176611910375"><h4 class="sectiontitle">Example</h4><ul id="css_03_0083__ul1075343819375"><li id="css_03_0083__li1975317385370">Example request<pre class="screen" id="css_03_0083__screen86961551184117">POST /v1.0/458d905f22da49c39f609e3347d65723/css-cluster/4f3deec3-efa8-4598-bf91-560aad1377a3/tags
|
|
{
|
|
"tag": {
|
|
"key": "DEV",
|
|
"value": "DEV1"
|
|
}
|
|
}</pre>
|
|
<p id="css_03_0083__p9900165914018"></p>
|
|
</li><li id="css_03_0083__li19902104293717">Example response<p id="css_03_0083__p1361634820372"><a name="css_03_0083__li19902104293717"></a><a name="li19902104293717"></a>None</p>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="css_03_0083__section2518650143716"><h4 class="sectiontitle">Status Code</h4><p id="css_03_0083__css_03_0081_p46921709171"><a href="#css_03_0083__css_03_0081_table12321369178">Table 3</a> describes status codes.</p>
|
|
|
|
<div class="tablenoborder"><a name="css_03_0083__css_03_0081_table12321369178"></a><a name="css_03_0081_table12321369178"></a><table cellpadding="4" cellspacing="0" summary="" id="css_03_0083__css_03_0081_table12321369178" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Status code</caption><thead align="left"><tr id="css_03_0083__css_03_0081_en-us_topic_0075288550_row1972183521418"><th align="left" class="cellrowborder" valign="top" width="33%" id="mcps1.3.6.3.2.4.1.1"><p id="css_03_0083__css_03_0081_en-us_topic_0075288550_p14560134151414">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="24.51%" id="mcps1.3.6.3.2.4.1.2"><p id="css_03_0083__css_03_0081_en-us_topic_0075288550_p5563194141411">Encoding</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="42.49%" id="mcps1.3.6.3.2.4.1.3"><p id="css_03_0083__css_03_0081_en-us_topic_0075288550_p256616411143">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="css_03_0083__css_03_0081_en-us_topic_0075288550_row129720356144"><td class="cellrowborder" valign="top" width="33%" headers="mcps1.3.6.3.2.4.1.1 "><p id="css_03_0083__css_03_0081_en-us_topic_0075288550_p1957004131410">400</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.51%" headers="mcps1.3.6.3.2.4.1.2 "><p id="css_03_0083__css_03_0081_en-us_topic_0075288550_p165731141171419">BadRequest</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="42.49%" headers="mcps1.3.6.3.2.4.1.3 "><p id="css_03_0083__css_03_0081_en-us_topic_0075288550_p65778413148">Invalid request.</p>
|
|
<p id="css_03_0083__css_03_0081_en-us_topic_0075288550_p1557974171415">Do not retry the request before modification.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="css_03_0083__css_03_0081_en-us_topic_0075288550_row8972103517147"><td class="cellrowborder" valign="top" width="33%" headers="mcps1.3.6.3.2.4.1.1 "><p id="css_03_0083__css_03_0081_en-us_topic_0075288550_p75841441191410">404</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.51%" headers="mcps1.3.6.3.2.4.1.2 "><p id="css_03_0083__css_03_0081_en-us_topic_0075288550_p258716416142">NotFound</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="42.49%" headers="mcps1.3.6.3.2.4.1.3 "><p id="css_03_0083__css_03_0081_en-us_topic_0075288550_p15589154118141">The requested resource cannot be found.</p>
|
|
<p id="css_03_0083__css_03_0081_en-us_topic_0075288550_p14590164151410">Do not retry the request before modification.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="css_03_0083__css_03_0081_en-us_topic_0075288550_row297223511416"><td class="cellrowborder" valign="top" width="33%" headers="mcps1.3.6.3.2.4.1.1 "><p id="css_03_0083__css_03_0081_en-us_topic_0075288550_p13595164131416">204</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.51%" headers="mcps1.3.6.3.2.4.1.2 "><p id="css_03_0083__css_03_0081_en-us_topic_0075288550_p9598741131416">OK</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="42.49%" headers="mcps1.3.6.3.2.4.1.3 "><p id="css_03_0083__css_03_0081_en-us_topic_0075288550_p659994115146">The request is processed successfully.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="css_03_0077.html">Tag Management APIs</a></div>
|
|
</div>
|
|
</div>
|
|
|