doc-exports/docs/sfs/api-ref/sfs_02_0075.html
zhangyue 8d1d100b18 SFS API DOC
Reviewed-by: Miskanin, Jan <jan.miskanin@t-systems.com>
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com>
Co-authored-by: zhangyue <zhangyue164@huawei.com>
Co-committed-by: zhangyue <zhangyue164@huawei.com>
2023-09-05 08:16:37 +00:00

157 lines
11 KiB
HTML

<a name="sfs_02_0075"></a><a name="sfs_02_0075"></a>
<h1 class="topictitle1">Adding a Tag to a File System</h1>
<div id="body1572053639618"><div class="section" id="sfs_02_0075__section19952658227"><h4 class="sectiontitle">Function</h4><p id="sfs_02_0075__p6238135915210">This API is used to add a tag to an SFS Turbo file system.</p>
<p id="sfs_02_0075__p723812591922">A shared file system can have a maximum of 20 tags.</p>
<p id="sfs_02_0075__p423817591326">The keys of multiple tags added to a shared file system must be unique.</p>
<p id="sfs_02_0075__p423820596210">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_0075__section5954175816214"><h4 class="sectiontitle">URI</h4><ul id="sfs_02_0075__ul1123815593214"><li id="sfs_02_0075__li1823885914220">POST /v1/{project_id}/sfs-turbo/{share_id}/tags</li><li id="sfs_02_0075__li11238135918213">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="sfs_02_0075__table896110581024" frame="border" border="1" rules="all"><thead align="left"><tr id="sfs_02_0075__row823820593215"><th align="left" class="cellrowborder" valign="top" width="17.82178217821782%" id="mcps1.3.2.2.2.1.1.5.1.1"><p id="sfs_02_0075__p0239059124">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="12.871287128712872%" id="mcps1.3.2.2.2.1.1.5.1.2"><p id="sfs_02_0075__p132392591324">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.85148514851485%" id="mcps1.3.2.2.2.1.1.5.1.3"><p id="sfs_02_0075__p20239659420">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="54.45544554455446%" id="mcps1.3.2.2.2.1.1.5.1.4"><p id="sfs_02_0075__p162396591423">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="sfs_02_0075__row182395599220"><td class="cellrowborder" valign="top" width="17.82178217821782%" headers="mcps1.3.2.2.2.1.1.5.1.1 "><p id="sfs_02_0075__p1239135916213">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="12.871287128712872%" headers="mcps1.3.2.2.2.1.1.5.1.2 "><p id="sfs_02_0075__p6239175911215">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="14.85148514851485%" headers="mcps1.3.2.2.2.1.1.5.1.3 "><p id="sfs_02_0075__p172396599215">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.45544554455446%" headers="mcps1.3.2.2.2.1.1.5.1.4 "><p id="sfs_02_0075__p7239165917210">Specifies the project ID of the operator.</p>
</td>
</tr>
<tr id="sfs_02_0075__row8239659524"><td class="cellrowborder" valign="top" width="17.82178217821782%" headers="mcps1.3.2.2.2.1.1.5.1.1 "><p id="sfs_02_0075__p1823955917217">share_id</p>
</td>
<td class="cellrowborder" valign="top" width="12.871287128712872%" headers="mcps1.3.2.2.2.1.1.5.1.2 "><p id="sfs_02_0075__p1223910591922">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="14.85148514851485%" headers="mcps1.3.2.2.2.1.1.5.1.3 "><p id="sfs_02_0075__p423917591326">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.45544554455446%" headers="mcps1.3.2.2.2.1.1.5.1.4 "><p id="sfs_02_0075__p0239125920218">Specifies the ID of the shared file system.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="sfs_02_0075__section397719581429"><h4 class="sectiontitle">Request</h4><ul id="sfs_02_0075__ul2023911591728"><li id="sfs_02_0075__li122399591120">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="sfs_02_0075__table89851582212" frame="border" border="1" rules="all"><thead align="left"><tr id="sfs_02_0075__row423935917214"><th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.3.2.1.1.1.5.1.1"><p id="sfs_02_0075__p19239185912217">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13%" id="mcps1.3.3.2.1.1.1.5.1.2"><p id="sfs_02_0075__p423912591522">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.3.2.1.1.1.5.1.3"><p id="sfs_02_0075__p0239125920220">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="55.00000000000001%" id="mcps1.3.3.2.1.1.1.5.1.4"><p id="sfs_02_0075__p172391359929">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="sfs_02_0075__row523919593213"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="sfs_02_0075__p1723955914218">tag</p>
</td>
<td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="sfs_02_0075__p1523920591020">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="sfs_02_0075__p623912591727">Object</p>
</td>
<td class="cellrowborder" valign="top" width="55.00000000000001%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="sfs_02_0075__p223919591221">Specifies the tag. For details, see <a href="#sfs_02_0075__table9514591528">Description of field resource_tag</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="sfs_02_0075__ul19239185911213"><li id="sfs_02_0075__li1923925918216">Description of field <strong id="sfs_02_0075__b129301825169">resource_tag</strong>
<div class="tablenoborder"><a name="sfs_02_0075__table9514591528"></a><a name="table9514591528"></a><table cellpadding="4" cellspacing="0" summary="" id="sfs_02_0075__table9514591528" frame="border" border="1" rules="all"><thead align="left"><tr id="sfs_02_0075__row12406591220"><th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.3.3.1.2.1.5.1.1"><p id="sfs_02_0075__p202401359723">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13%" id="mcps1.3.3.3.1.2.1.5.1.2"><p id="sfs_02_0075__p924095914212">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.3.3.1.2.1.5.1.3"><p id="sfs_02_0075__p224035911210">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="55.00000000000001%" id="mcps1.3.3.3.1.2.1.5.1.4"><p id="sfs_02_0075__p9240159824">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="sfs_02_0075__row824045915212"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.3.1.2.1.5.1.1 "><p id="sfs_02_0075__p72401259322">key</p>
</td>
<td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.3.3.1.2.1.5.1.2 "><p id="sfs_02_0075__p14240459628">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.3.1.2.1.5.1.3 "><p id="sfs_02_0075__p12401659326">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.00000000000001%" headers="mcps1.3.3.3.1.2.1.5.1.4 "><p id="sfs_02_0075__p16240205910216">Specifies the tag key. The value can contain a maximum of 36 characters. This parameter cannot be left empty. It cannot contain the following characters: ASCII (0-31), asterisks (*), left angle brackets (&lt;), right angle brackets (&gt;), backslashes (\), equal signs (=), commas (,), vertical bars (|), and slashes (/). It can contain only letters, digits, hyphens (-), and underscores (_).</p>
</td>
</tr>
<tr id="sfs_02_0075__row17240105913211"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.3.1.2.1.5.1.1 "><p id="sfs_02_0075__p1424011593215">value</p>
</td>
<td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.3.3.1.2.1.5.1.2 "><p id="sfs_02_0075__p22402597210">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.3.1.2.1.5.1.3 "><p id="sfs_02_0075__p2240859020">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.00000000000001%" headers="mcps1.3.3.3.1.2.1.5.1.4 "><p id="sfs_02_0075__p112402591728">Specifies the tag value. The value contains a maximum of 43 characters and can be an empty string. It cannot contain ASCII (0-31) or the following characters: =*&lt;&gt;\,|/ It can contain only letters, digits, hyphens (-), and underscores (_).</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="sfs_02_0075__ul52403594216"><li id="sfs_02_0075__li1324005914216">Example request<pre class="screen" id="sfs_02_0075__screen996218818193">{
"tag":{
"key":"key1",
"value":"value1"
}
}</pre>
</li></ul>
</div>
<div class="section" id="sfs_02_0075__section18278591027"><h4 class="sectiontitle">Response</h4><ul id="sfs_02_0075__ul192401759826"><li id="sfs_02_0075__li162405591324">Parameter description<p id="sfs_02_0075__p102401459625"><a name="sfs_02_0075__li162405591324"></a><a name="li162405591324"></a>None</p>
</li><li id="sfs_02_0075__li52401459524">Example response<p id="sfs_02_0075__p12240159923"><a name="sfs_02_0075__li52401459524"></a><a name="li52401459524"></a>None</p>
</li></ul>
</div>
<div class="section" id="sfs_02_0075__section183025918212"><h4 class="sectiontitle">Status Codes</h4><ul id="sfs_02_0075__ul2024035920219"><li id="sfs_02_0075__li19240165915211">Normal<p id="sfs_02_0075__p124016591222"><a name="sfs_02_0075__li19240165915211"></a><a name="li19240165915211"></a>204</p>
</li><li id="sfs_02_0075__li324113591525">Abnormal
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="sfs_02_0075__table15462059725" frame="border" border="1" rules="all"><thead align="left"><tr id="sfs_02_0075__row92411059121"><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_0075__p724110591326">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_0075__p2241165919218">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="sfs_02_0075__row12241359524"><td class="cellrowborder" valign="top" width="43.43%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="sfs_02_0075__p152415592020">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_0075__p424114594216">Invalid value.</p>
</td>
</tr>
<tr id="sfs_02_0075__row4241115914216"><td class="cellrowborder" valign="top" width="43.43%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="sfs_02_0075__p15241165916218">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_0075__p162418591522">Authentication failed.</p>
</td>
</tr>
<tr id="sfs_02_0075__row1824118591222"><td class="cellrowborder" valign="top" width="43.43%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="sfs_02_0075__p924119593213">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_0075__p824125919213">Access to the requested page is forbidden.</p>
</td>
</tr>
<tr id="sfs_02_0075__row22410591328"><td class="cellrowborder" valign="top" width="43.43%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="sfs_02_0075__p5241759028">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_0075__p1224113599212">The requested resource was not found.</p>
</td>
</tr>
<tr id="sfs_02_0075__row1824195920217"><td class="cellrowborder" valign="top" width="43.43%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="sfs_02_0075__p02411591127">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_0075__p1824175914217">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_0074.html">Tag Management</a></div>
</div>
</div>