doc-exports/docs/sfs/api-ref/sfs_02_0078.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

189 lines
14 KiB
HTML

<a name="sfs_02_0078"></a><a name="sfs_02_0078"></a>
<h1 class="topictitle1">Batch Adding Tags to a File System</h1>
<div id="body1572053639618"><div class="section" id="sfs_02_0078__section65483112161"><h4 class="sectiontitle">Function</h4><p id="sfs_02_0078__p10335193111161">This API is used to batch add tags to an SFS Turbo file system.</p>
<p id="sfs_02_0078__p193353316163">A shared file system can have a maximum of 10 tags.</p>
<p id="sfs_02_0078__p173351131111617">The keys of multiple tags added to a shared file system must be unique.</p>
<p id="sfs_02_0078__p123355313165">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_0078__section175533119163"><h4 class="sectiontitle">URI</h4><ul id="sfs_02_0078__ul533523114163"><li id="sfs_02_0078__li1633510317167">POST /v1/{project_id}/sfs-turbo/{share_id}/tags/action</li><li id="sfs_02_0078__li3336113181618">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="sfs_02_0078__table1581831111615" frame="border" border="1" rules="all"><thead align="left"><tr id="sfs_02_0078__row13366315162"><th align="left" class="cellrowborder" valign="top" width="16%" id="mcps1.3.2.2.2.1.1.5.1.1"><p id="sfs_02_0078__p9336103151610">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.000000000000002%" id="mcps1.3.2.2.2.1.1.5.1.2"><p id="sfs_02_0078__p733610314161">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.000000000000002%" id="mcps1.3.2.2.2.1.1.5.1.3"><p id="sfs_02_0078__p3336931101610">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="56.00000000000001%" id="mcps1.3.2.2.2.1.1.5.1.4"><p id="sfs_02_0078__p233618316167">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="sfs_02_0078__row433663111613"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.2.2.2.1.1.5.1.1 "><p id="sfs_02_0078__p533673115168">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.2.2.2.1.1.5.1.2 "><p id="sfs_02_0078__p13361731191618">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.2.2.2.1.1.5.1.3 "><p id="sfs_02_0078__p1633603119165">String</p>
</td>
<td class="cellrowborder" valign="top" width="56.00000000000001%" headers="mcps1.3.2.2.2.1.1.5.1.4 "><p id="sfs_02_0078__p1433663141615">Specifies the project ID of the operator.</p>
</td>
</tr>
<tr id="sfs_02_0078__row103366312165"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.2.2.2.1.1.5.1.1 "><p id="sfs_02_0078__p03366312165">share_id</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.2.2.2.1.1.5.1.2 "><p id="sfs_02_0078__p9336731171612">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.2.2.2.1.1.5.1.3 "><p id="sfs_02_0078__p18336203114169">String</p>
</td>
<td class="cellrowborder" valign="top" width="56.00000000000001%" headers="mcps1.3.2.2.2.1.1.5.1.4 "><p id="sfs_02_0078__p14336143117168">Specifies the ID of the shared file system.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<p id="sfs_02_0078__p3336143181617"></p>
</div>
<div class="section" id="sfs_02_0078__section1979183112167"><h4 class="sectiontitle">Request</h4><ul id="sfs_02_0078__ul23361231131613"><li id="sfs_02_0078__li183363316162">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="sfs_02_0078__table1983123118167" frame="border" border="1" rules="all"><thead align="left"><tr id="sfs_02_0078__row8337183114167"><th align="left" class="cellrowborder" valign="top" width="16.16161616161616%" id="mcps1.3.3.2.1.1.1.5.1.1"><p id="sfs_02_0078__p233715314165">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.14141414141414%" id="mcps1.3.3.2.1.1.1.5.1.2"><p id="sfs_02_0078__p19337731141617">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.14141414141414%" id="mcps1.3.3.2.1.1.1.5.1.3"><p id="sfs_02_0078__p143371731201613">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="55.55555555555556%" id="mcps1.3.3.2.1.1.1.5.1.4"><p id="sfs_02_0078__p3337183151613">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="sfs_02_0078__row23371131201615"><td class="cellrowborder" valign="top" width="16.16161616161616%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="sfs_02_0078__p1033703110160">action</p>
</td>
<td class="cellrowborder" valign="top" width="14.14141414141414%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="sfs_02_0078__p123375313169">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="14.14141414141414%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="sfs_02_0078__p9337231191611">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.55555555555556%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="sfs_02_0078__p163371031141615">Specifies the operation identifier. Possible values are <strong id="sfs_02_0078__b842352706192333">create</strong> and <strong id="sfs_02_0078__b842352706192336">delete</strong>. Use <strong id="sfs_02_0078__b18511948154015">create</strong> to batch add tags to a specified shared file system.</p>
</td>
</tr>
<tr id="sfs_02_0078__row93371831161612"><td class="cellrowborder" valign="top" width="16.16161616161616%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="sfs_02_0078__p93371731101616">tags</p>
</td>
<td class="cellrowborder" valign="top" width="14.14141414141414%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="sfs_02_0078__p53375313160">No</p>
</td>
<td class="cellrowborder" valign="top" width="14.14141414141414%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="sfs_02_0078__p4337163118163">list&lt;resource_tag&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="55.55555555555556%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="sfs_02_0078__p333716314164">Specifies the tag list.</p>
<p id="sfs_02_0078__p1433715315161">This parameter is mandatory when the tenant permission is used. For the op_service permission, choose either this field or <strong id="sfs_02_0078__b61898389371">sys_tags</strong>. For details, see <a href="#sfs_02_0078__table69719318161">Description of field resource_tag</a>.</p>
</td>
</tr>
<tr id="sfs_02_0078__row433833115169"><td class="cellrowborder" valign="top" width="16.16161616161616%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="sfs_02_0078__p133863115161">sys_tags</p>
</td>
<td class="cellrowborder" valign="top" width="14.14141414141414%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="sfs_02_0078__p11338163118160">No</p>
</td>
<td class="cellrowborder" valign="top" width="14.14141414141414%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="sfs_02_0078__p433893131614">List&lt;resource_tag&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="55.55555555555556%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="sfs_02_0078__p16338203111610">Specifies the system tag list.</p>
<p id="sfs_02_0078__p43381231161611">This field is available only to the op_service permission. Choose either this field or <strong id="sfs_02_0078__b829912156397">tags</strong>.</p>
<p id="sfs_02_0078__p13338173116168">Only one resource_tag structure key, <strong id="sfs_02_0078__b11487141982814">_sys_enterprise_project_id</strong>, is used in TMS calls.</p>
<p id="sfs_02_0078__p4338123111163">The value is <strong id="sfs_02_0078__b3700172610280">ID</strong> or <strong id="sfs_02_0078__b197085267282">0</strong>. Value <strong id="sfs_02_0078__b1570919260288">0</strong> indicates the default enterprise project.</p>
<p id="sfs_02_0078__p0220148047">For details, see <a href="#sfs_02_0078__table69719318161">Description of field resource_tag</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<p id="sfs_02_0078__p103381431151610"></p>
<ul id="sfs_02_0078__ul13387317169"><li id="sfs_02_0078__li103381431131615">Description of field <strong id="sfs_02_0078__b1445713264114">resource_tag</strong>
<div class="tablenoborder"><a name="sfs_02_0078__table69719318161"></a><a name="table69719318161"></a><table cellpadding="4" cellspacing="0" summary="" id="sfs_02_0078__table69719318161" frame="border" border="1" rules="all"><thead align="left"><tr id="sfs_02_0078__row20338331181616"><th align="left" class="cellrowborder" valign="top" width="16.16161616161616%" id="mcps1.3.3.4.1.2.1.5.1.1"><p id="sfs_02_0078__p153381312162">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.14141414141414%" id="mcps1.3.3.4.1.2.1.5.1.2"><p id="sfs_02_0078__p19338231161613">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.14141414141414%" id="mcps1.3.3.4.1.2.1.5.1.3"><p id="sfs_02_0078__p14338153121618">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="55.55555555555556%" id="mcps1.3.3.4.1.2.1.5.1.4"><p id="sfs_02_0078__p83381831151613">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="sfs_02_0078__row4338831161618"><td class="cellrowborder" valign="top" width="16.16161616161616%" headers="mcps1.3.3.4.1.2.1.5.1.1 "><p id="sfs_02_0078__p15338153118161">key</p>
</td>
<td class="cellrowborder" valign="top" width="14.14141414141414%" headers="mcps1.3.3.4.1.2.1.5.1.2 "><p id="sfs_02_0078__p93384315166">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="14.14141414141414%" headers="mcps1.3.3.4.1.2.1.5.1.3 "><p id="sfs_02_0078__p1733819310166">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.55555555555556%" headers="mcps1.3.3.4.1.2.1.5.1.4 "><p id="sfs_02_0078__p633816312164">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_0078__row83387319165"><td class="cellrowborder" valign="top" width="16.16161616161616%" headers="mcps1.3.3.4.1.2.1.5.1.1 "><p id="sfs_02_0078__p183381431111615">value</p>
</td>
<td class="cellrowborder" valign="top" width="14.14141414141414%" headers="mcps1.3.3.4.1.2.1.5.1.2 "><p id="sfs_02_0078__p20338153111611">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="14.14141414141414%" headers="mcps1.3.3.4.1.2.1.5.1.3 "><p id="sfs_02_0078__p7339123111614">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.55555555555556%" headers="mcps1.3.3.4.1.2.1.5.1.4 "><p id="sfs_02_0078__p17339123151613">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_0078__ul43392315168"><li id="sfs_02_0078__li203391431171617">Example request<pre class="screen" id="sfs_02_0078__screen18662107102717">{
"action": "create",
"tags": [
{
"key": "key1",
"value": "value1"
},
{
"key": "key2",
"value": "value2"
}
]
}</pre>
</li></ul>
</div>
<div class="section" id="sfs_02_0078__section1212743118162"><h4 class="sectiontitle">Response</h4><ul id="sfs_02_0078__ul9339123161616"><li id="sfs_02_0078__li20339193111614">Parameter description<p id="sfs_02_0078__p193391431191610"><a name="sfs_02_0078__li20339193111614"></a><a name="li20339193111614"></a>None</p>
</li><li id="sfs_02_0078__li14339103181611">Example response<p id="sfs_02_0078__p033963191616"><a name="sfs_02_0078__li14339103181611"></a><a name="li14339103181611"></a>None</p>
</li></ul>
</div>
<div class="section" id="sfs_02_0078__section81304315161"><h4 class="sectiontitle">Status Codes</h4><ul id="sfs_02_0078__ul10339231181612"><li id="sfs_02_0078__li13339153101612">Normal<p id="sfs_02_0078__p2339193119163"><a name="sfs_02_0078__li13339153101612"></a><a name="li13339153101612"></a>204</p>
</li><li id="sfs_02_0078__li83391531181612">Abnormal
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="sfs_02_0078__table171328317163" frame="border" border="1" rules="all"><thead align="left"><tr id="sfs_02_0078__row7339431201611"><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_0078__p9339163181611">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_0078__p1633973120168">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="sfs_02_0078__row19339631181615"><td class="cellrowborder" valign="top" width="43.43%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="sfs_02_0078__p53391531191619">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_0078__p93394314169">Invalid value.</p>
</td>
</tr>
<tr id="sfs_02_0078__row11339143116167"><td class="cellrowborder" valign="top" width="43.43%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="sfs_02_0078__p7339183171616">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_0078__p1033943161618">Authentication failed.</p>
</td>
</tr>
<tr id="sfs_02_0078__row9339731191620"><td class="cellrowborder" valign="top" width="43.43%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="sfs_02_0078__p73391319164">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_0078__p13394315165">Access to the requested page is forbidden.</p>
</td>
</tr>
<tr id="sfs_02_0078__row6339173116167"><td class="cellrowborder" valign="top" width="43.43%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="sfs_02_0078__p1234053118161">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_0078__p7340163113168">The requested resource was not found.</p>
</td>
</tr>
<tr id="sfs_02_0078__row534053141616"><td class="cellrowborder" valign="top" width="43.43%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="sfs_02_0078__p16340131151610">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_0078__p03401831151612">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>