Skip to content

Commit 2879442

Browse files
committed
Update content
1 parent 56ef8da commit 2879442

File tree

45 files changed

+3142
-1323
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+3142
-1323
lines changed

api-ref/source/calling_apis_sfs_capacity-oriented_and_sfs_turbo/authentication.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@ AK/SK Authentication
1515

1616
.. note::
1717

18-
AK/SK authentication supports API requests with a body not larger than 12 MB. For API requests with a larger body, token authentication is recommended.
18+
- AK/SK authentication supports API requests with a body not larger than 12 MB. For API requests with a larger body, token authentication is recommended.
19+
- API Gateway checks the time format and compares the request time with the time when API Gateway received the request. If the time difference exceeds 15 minutes, API Gateway will reject the request. So, the local time on the client must be synchronized with the clock server to avoid a large offset in the value of **X-Sdk-Date** in the request header.
1920

20-
In AK/SK authentication, AK/SK is used to sign requests and the signature is then added to the requests for authentication.
21+
In AK/SK authentication, an AK/SK pair is used to sign requests and the signature is then added to the requests for authentication.
2122

2223
- AK: access key ID, which is a unique identifier used in conjunction with a secret access key to sign requests cryptographically.
2324
- SK: secret access key, which is used in conjunction with an AK to sign requests cryptographically. It identifies a request sender and prevents the request from being modified.
2425

25-
In AK/SK authentication, you can use an AK/SK to sign requests based on the signature algorithm or using the signing SDK.
26+
In AK/SK authentication, you can use an AK/SK pair to sign requests based on the signature algorithm or using the signing SDK.
2627

2728
.. note::
2829

@@ -33,7 +34,8 @@ Token Authentication
3334

3435
.. note::
3536

36-
The validity period of a token is 24 hours. When using a token for authentication, cache it to prevent frequently calling the IAM API used to obtain a user token.
37+
- A token remains valid for 24 hours after it is generated. You can cache a token and reuse it for authentication instead of generating a new one each time.
38+
- Before using a token, ensure that it has sufficient time remaining before expiration. Using a near-expiry token may cause API call failures.
3739

3840
A token specifies temporary permissions in a computer system. During API authentication using a token, the token is added to requests to get permissions for calling the API. You can obtain a token by calling the `Obtaining a User Token <https://docs.otc.t-systems.com/en-us/api/iam/en-us_topic_0057845583.html>`__ API.
3941

@@ -50,7 +52,7 @@ IMS is a project-level service. When you call the API, set **auth.scope** in the
5052
"password": {
5153
"user": {
5254
"name": "username", // IAM user name
53-
"password": $ADMIN_PASS, //IAM user password. You are advised to store it in ciphertext in the configuration file or an environment variable and decrypt it when needed to ensure security.
55+
"password": $ADMIN_PASS, // IAM user password. You are advised to store it in ciphertext in the configuration file or an environment variable and decrypt it when needed to ensure security.
5456
"domain": {
5557
"name": "domainname" // Name of the domain that the IAM user belongs to
5658
}

api-ref/source/calling_apis_sfs_capacity-oriented_and_sfs_turbo/response.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Response Header
1919

2020
Similar to a request, a response also has a header, for example, **Content-Type**.
2121

22-
:ref:`Figure 1 <sfs_02_0012__en-us_topic_0170155703_fig4865141011511>` shows the response header fields for the API used to . The **X-Subject-Token** header field is the desired user token. This token can then be used to authenticate the calling of other APIs.
22+
:ref:`Figure 1 <sfs_02_0012__en-us_topic_0170155703_fig4865141011511>` shows the response header for the API used to . The **X-Subject-Token** header field is the desired user token. This token can then be used to authenticate the calling of other APIs.
2323

2424
.. note::
2525

api-ref/source/change_history.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ Change History
88
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
99
| Released On | Description |
1010
+===================================+===========================================================================================================================================================================================================================================================+
11+
| 2025-09-28 | Updated the following content: |
12+
| | |
13+
| | Added the description of tag-related APIs. |
14+
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1115
| 2025-04-07 | Updated the following content: |
1216
| | |
1317
| | - Added descriptions about General Purpose File System APIs. |

api-ref/source/general_purpose_file_system_apis_beta/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ General Purpose File System APIs (BETA)
77

88
- :ref:`File Systems <sfs_02_0111>`
99
- :ref:`File System Access Rules <sfs_02_0115>`
10+
- :ref:`Tags <sfs_03_0001>`
1011

1112
.. toctree::
1213
:maxdepth: 1
1314
:hidden:
1415

1516
file_systems/index
1617
file_system_access_rules/index
18+
tags/index
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
:original_name: sfs_03_0002.html
2+
3+
.. _sfs_03_0002:
4+
5+
Batch Adding Tags to a Resource
6+
===============================
7+
8+
Function
9+
--------
10+
11+
This API is used to batch add tags for a general purpose file system. You can add up to 20 tags to a resource.
12+
13+
URI
14+
---
15+
16+
- POST /v3/sfs/tms/{project_id}/file-systems/{resource_id}/tags/create
17+
- Parameter description
18+
19+
+-------------+-----------+--------+----------------------------------------------------------------------+
20+
| Parameter | Mandatory | Type | Description |
21+
+=============+===========+========+======================================================================+
22+
| project_id | Yes | String | The project ID. |
23+
+-------------+-----------+--------+----------------------------------------------------------------------+
24+
| resource_id | Yes | String | The resource ID, which is the name of a general purpose file system. |
25+
+-------------+-----------+--------+----------------------------------------------------------------------+
26+
27+
Request Parameters
28+
------------------
29+
30+
.. table:: **Table 1** Request header parameters
31+
32+
+-----------------+-----------------+-----------------+------------------------------------+
33+
| Parameter | Mandatory | Type | Description |
34+
+=================+=================+=================+====================================+
35+
| Content-type | Yes | String | The MIME type of the request body. |
36+
| | | | |
37+
| | | | Example: application/json |
38+
+-----------------+-----------------+-----------------+------------------------------------+
39+
| X-Auth-Token | No | String | The user token. |
40+
+-----------------+-----------------+-----------------+------------------------------------+
41+
42+
.. table:: **Table 2** Request body parameters
43+
44+
+-----------------+-----------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+
45+
| Parameter | Mandatory | Type | Description |
46+
+=================+=================+=========================================================================================+==============================================================================================================+
47+
| tags | No | List<:ref:`resource_tag <sfs_03_0002__en-us_topic_0000001886392461_table667613216170>`> | The tag list. For details, see :ref:`Table 3 <sfs_03_0002__en-us_topic_0000001886392461_table667613216170>`. |
48+
| | | | |
49+
| | | | This parameter is mandatory for common tenants. |
50+
| | | | |
51+
| | | | Use either **tags** or **sys_tags** if you have the op_service permissions. |
52+
+-----------------+-----------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+
53+
| sys_tags | No | List<:ref:`resource_tag <sfs_03_0002__en-us_topic_0000001886392461_table667613216170>`> | The system tag list. This parameter is available only to the op_service permissions. |
54+
| | | | |
55+
| | | | Use either **tags** or **sys_tags** if you have the op_service permissions. |
56+
| | | | |
57+
| | | | Only one **resource_tag** structure is used in TMS calls currently. |
58+
| | | | |
59+
| | | | The key is fixed at **\_sys_enterprise_project_id**. |
60+
| | | | |
61+
| | | | The value can be **UUID** or **0**. **0** indicates the default enterprise project. |
62+
| | | | |
63+
| | | | System tags can only be added. |
64+
| | | | |
65+
| | | | For details, see :ref:`Table 3 <sfs_03_0002__en-us_topic_0000001886392461_table667613216170>`. |
66+
+-----------------+-----------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+
67+
68+
.. _sfs_03_0002__en-us_topic_0000001886392461_table667613216170:
69+
70+
.. table:: **Table 3** resource_tag
71+
72+
+-----------+-----------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
73+
| Parameter | Mandatory | Type | Description |
74+
+===========+===========+========+============================================================================================================================================================================================================================================================================================================================================+
75+
| key | Yes | String | The tag key. A tag key can contain a maximum of 128 characters. It can contain letters, digits, and spaces representable in UTF-8 and special characters ``(_.:=+-@).`` It cannot start or end with a space and cannot be left empty. Tag keys starting with **\_sys\_** are system tags, and you cannot start a tag key with **\_sys\_**. |
76+
+-----------+-----------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
77+
| value | No | String | The tag value. A tag value can contain a maximum of 255 characters. It can contain letters, digits, and spaces representable in UTF-8 and special characters ``(_.:=+-@)`` and can be left empty. It cannot start or end with a space. |
78+
+-----------+-----------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
79+
80+
Response Parameters
81+
-------------------
82+
83+
None
84+
85+
Example Request
86+
---------------
87+
88+
Batch adding tags to a general purpose file system whose name is **bucketName** with the project ID **c80a2157ba1d46c0825265947342077c**:
89+
90+
.. code-block:: text
91+
92+
POST https://{endpoint}/v3/sfs/tms/c80a2157ba1d46c0825265947342077c/file-systems/bucketName/tags/create
93+
94+
Request body example:
95+
96+
.. code-block::
97+
98+
{
99+
"tags":[
100+
{
101+
"key":"key1",
102+
"value":"value1"
103+
},
104+
{
105+
"key":"key2",
106+
"value":"value2"
107+
}
108+
]
109+
}
110+
111+
Example Response
112+
----------------
113+
114+
None
115+
116+
Status Codes
117+
------------
118+
119+
- Normal
120+
121+
=========== ========================
122+
Status Code Description
123+
=========== ========================
124+
204 Resource tags are added.
125+
=========== ========================
126+
127+
- Abnormal
128+
129+
=========== ======================
130+
Status Code Description
131+
=========== ======================
132+
400 Invalid tag parameter.
133+
401 Certification failed.
134+
403 Authentication failed.
135+
404 Resource not found.
136+
500 System error.
137+
=========== ======================

0 commit comments

Comments
 (0)