doc-exports/docs/sfs/api-ref/sfs_02_0037.html
zhangyue 5d0d5cb580 SFS API DOC
Reviewed-by: Muller, Martin <martin.muller@t-systems.com>
Co-authored-by: zhangyue <zhangyue164@huawei.com>
Co-committed-by: zhangyue <zhangyue164@huawei.com>
2023-05-01 07:32:40 +00:00

156 lines
11 KiB
HTML

<a name="sfs_02_0037"></a><a name="sfs_02_0037"></a>
<h1 class="topictitle1">Adding a Tag to a Shared File System</h1>
<div id="body1521093540922"><div class="section" id="sfs_02_0037__section10684447163819"><h4 class="sectiontitle">Function</h4><p id="sfs_02_0037__p531134294716">This API is used to add a tag to a specified shared file system.</p>
<p id="sfs_02_0037__p2311242164717">A shared file system can have a maximum of 10 tags.</p>
<p id="sfs_02_0037__p4311542204718">The keys of multiple tags added to a shared file system must be unique.</p>
<p id="sfs_02_0037__p1331342114719">This API is idempotent. If the key to be added has already been added to the shared file system, the tag is updated.</p>
</div>
<div class="section" id="sfs_02_0037__section1665327514513"><h4 class="sectiontitle">URI</h4><ul id="sfs_02_0037__ul673803814513"><li id="sfs_02_0037__li6064234314513">POST /v2/{project_id}/sfs/{share_id}/tags</li><li id="sfs_02_0037__li891018114513">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="sfs_02_0037__table22021759152019" frame="border" border="1" rules="all"><thead align="left"><tr id="sfs_02_0037__row16139965152019"><th align="left" class="cellrowborder" valign="top" width="18.181818181818183%" id="mcps1.3.2.2.2.1.1.5.1.1"><p id="sfs_02_0037__p17124101410431">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.131313131313133%" id="mcps1.3.2.2.2.1.1.5.1.2"><p id="sfs_02_0037__p1612415146430">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.191919191919194%" id="mcps1.3.2.2.2.1.1.5.1.3"><p id="sfs_02_0037__p312416148432">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="49.494949494949495%" id="mcps1.3.2.2.2.1.1.5.1.4"><p id="sfs_02_0037__p3124181464318">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="sfs_02_0037__row55089343152019"><td class="cellrowborder" valign="top" width="18.181818181818183%" headers="mcps1.3.2.2.2.1.1.5.1.1 "><p id="sfs_02_0037__p1781134044818">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="13.131313131313133%" headers="mcps1.3.2.2.2.1.1.5.1.2 "><p id="sfs_02_0037__p59952126152019">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="19.191919191919194%" headers="mcps1.3.2.2.2.1.1.5.1.3 "><p id="sfs_02_0037__p24284048152019">String</p>
</td>
<td class="cellrowborder" valign="top" width="49.494949494949495%" headers="mcps1.3.2.2.2.1.1.5.1.4 "><p id="sfs_02_0037__p20850895152019">Specifies the project ID of the operator.</p>
</td>
</tr>
<tr id="sfs_02_0037__row3119103219486"><td class="cellrowborder" valign="top" width="18.181818181818183%" headers="mcps1.3.2.2.2.1.1.5.1.1 "><p id="sfs_02_0037__p1011933217487">share_id</p>
</td>
<td class="cellrowborder" valign="top" width="13.131313131313133%" headers="mcps1.3.2.2.2.1.1.5.1.2 "><p id="sfs_02_0037__p18120163210481">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="19.191919191919194%" headers="mcps1.3.2.2.2.1.1.5.1.3 "><p id="sfs_02_0037__p11120113294813">String</p>
</td>
<td class="cellrowborder" valign="top" width="49.494949494949495%" headers="mcps1.3.2.2.2.1.1.5.1.4 "><p id="sfs_02_0037__p13120143211489">Specifies the ID of the shared file system.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="sfs_02_0037__section5063604914513"><h4 class="sectiontitle">Request</h4><ul id="sfs_02_0037__ul787926514513"><li id="sfs_02_0037__li380452214513">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="sfs_02_0037__table1836815510524" frame="border" border="1" rules="all"><thead align="left"><tr id="sfs_02_0037__row1137265565217"><th align="left" class="cellrowborder" valign="top" width="17.171717171717173%" id="mcps1.3.3.2.1.1.1.5.1.1"><p id="sfs_02_0037__p9445335122519">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.131313131313133%" id="mcps1.3.3.2.1.1.1.5.1.2"><p id="sfs_02_0037__p194456353258">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.191919191919194%" id="mcps1.3.3.2.1.1.1.5.1.3"><p id="sfs_02_0037__p12445335152517">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50.505050505050505%" id="mcps1.3.3.2.1.1.1.5.1.4"><p id="sfs_02_0037__p1344583582512">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="sfs_02_0037__row8379125520523"><td class="cellrowborder" valign="top" width="17.171717171717173%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="sfs_02_0037__p13380755115210">tag</p>
</td>
<td class="cellrowborder" valign="top" width="13.131313131313133%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="sfs_02_0037__p1038255513523">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="19.191919191919194%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="sfs_02_0037__p18383165518521">Resource_tag</p>
</td>
<td class="cellrowborder" valign="top" width="50.505050505050505%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="sfs_02_0037__p938455505218">Specifies the tag. </p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="sfs_02_0037__li187471828172811">Description of field <strong id="sfs_02_0037__b129301825169">resource_tag</strong>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="sfs_02_0037__table14385185545214" frame="border" border="1" rules="all"><thead align="left"><tr id="sfs_02_0037__row5389135517522"><th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.3.2.2.2.1.5.1.1"><p id="sfs_02_0037__p102581042162519">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.000000000000002%" id="mcps1.3.3.2.2.2.1.5.1.2"><p id="sfs_02_0037__p1027318421254">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19%" id="mcps1.3.3.2.2.2.1.5.1.3"><p id="sfs_02_0037__p327312421253">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.3.2.2.2.1.5.1.4"><p id="sfs_02_0037__p227312429253">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="sfs_02_0037__row10396165515211"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.2.2.2.1.5.1.1 "><p id="sfs_02_0037__p7397185512522">key</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.3.2.2.2.1.5.1.2 "><p id="sfs_02_0037__p19398125516523">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.3.2.2.2.1.5.1.3 "><p id="sfs_02_0037__p18399255165215">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.2.2.1.5.1.4 "><p id="sfs_02_0037__p14400185515528">Specifies the tag key. The value can contain a maximum of 36 characters. The key cannot be left blank and can only contain letters, digits, hyphens (-), and underscores (_).</p>
</td>
</tr>
<tr id="sfs_02_0037__row144011055105210"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.2.2.2.1.5.1.1 "><p id="sfs_02_0037__p144021355135210">value</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.3.2.2.2.1.5.1.2 "><p id="sfs_02_0037__p1640495512522">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.3.2.2.2.1.5.1.3 "><p id="sfs_02_0037__p16405255185213">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.2.2.1.5.1.4 "><p id="sfs_02_0037__p240685517526">Specifies the tag value. The value contains a maximum of 43 characters and can be an empty string. It can only contain letters, digits, hyphens (-), and underscores (_).</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="sfs_02_0037__li3973086014513">Example request<pre class="screen" id="sfs_02_0037__screen1279212312533">{
"tag" : {
"key" : "key1",
"value" : "value1"
}
}</pre>
</li></ul>
</div>
<div class="section" id="sfs_02_0037__section6408307814513"><h4 class="sectiontitle">Response</h4><ul id="sfs_02_0037__ul2334684914513"><li id="sfs_02_0037__li879505414513">Parameter description<p id="sfs_02_0037__ac213f604d5cf4e85a07dd78f95b5205b"><a name="sfs_02_0037__li879505414513"></a><a name="li879505414513"></a>None</p>
</li></ul>
<ul id="sfs_02_0037__ul3903357014513"><li id="sfs_02_0037__li1575781314513">Example response<p id="sfs_02_0037__p138241544115414"><a name="sfs_02_0037__li1575781314513"></a><a name="li1575781314513"></a>None</p>
</li></ul>
</div>
<div class="section" id="sfs_02_0037__section4959408514513"><h4 class="sectiontitle">Status Codes</h4><ul id="sfs_02_0037__ul5769798014513"><li id="sfs_02_0037__li4951977214513">Normal<p id="sfs_02_0037__p4302476614513"><a name="sfs_02_0037__li4951977214513"></a><a name="li4951977214513"></a>204</p>
</li><li id="sfs_02_0037__li5167858014513">Abnormal
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="sfs_02_0037__table6245403714513" frame="border" border="1" rules="all"><thead align="left"><tr id="sfs_02_0037__row1507735814513"><th align="left" class="cellrowborder" valign="top" width="43.43%" id="mcps1.3.5.2.2.1.1.3.1.1"><p id="sfs_02_0037__p1330652014513">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="56.57%" id="mcps1.3.5.2.2.1.1.3.1.2"><p id="sfs_02_0037__p408636314513">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="sfs_02_0037__row3477393214513"><td class="cellrowborder" valign="top" width="43.43%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="sfs_02_0037__p6522508214513">400 Bad Request</p>
</td>
<td class="cellrowborder" valign="top" width="56.57%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="sfs_02_0037__p4874025614513">Invalid value.</p>
</td>
</tr>
<tr id="sfs_02_0037__row3600912414513"><td class="cellrowborder" valign="top" width="43.43%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="sfs_02_0037__p3105792214513">401 Unauthorized</p>
</td>
<td class="cellrowborder" valign="top" width="56.57%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="sfs_02_0037__p3266375714513">Authentication failed.</p>
</td>
</tr>
<tr id="sfs_02_0037__row2553835814513"><td class="cellrowborder" valign="top" width="43.43%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="sfs_02_0037__p5534113514513">403 Forbidden</p>
</td>
<td class="cellrowborder" valign="top" width="56.57%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="sfs_02_0037__p5344692014513">Access to the requested page is forbidden.</p>
</td>
</tr>
<tr id="sfs_02_0037__row1126023214513"><td class="cellrowborder" valign="top" width="43.43%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="sfs_02_0037__p3966357214513">404 Not Found</p>
</td>
<td class="cellrowborder" valign="top" width="56.57%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="sfs_02_0037__p5863278914513">The requested resource was not found.</p>
</td>
</tr>
<tr id="sfs_02_0037__row1011562214513"><td class="cellrowborder" valign="top" width="43.43%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="sfs_02_0037__p1405905414513">500 Internal Server Error</p>
</td>
<td class="cellrowborder" valign="top" width="56.57%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="sfs_02_0037__p6504160314513">The request is not completed because of a service error.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="sfs_02_0036.html">Tag Management</a></div>
</div>
</div>