Querying Tags of a Resource
Function
This API is used to query tags of a specified resource.
URI
- GET /v3/sfs/tms/{project_id}/file-systems/{resource_id}/tags
- Parameter description
Parameter
Mandatory
Type
Description
project_id
Yes
String
The project ID. For details, see Obtaining a Project ID.
resource_id
Yes
String
The resource ID, which is the name of a general purpose file system.
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Content-type |
Yes |
String |
The MIME type of the request body. Example: application/json |
X-Auth-Token |
No |
String |
The user token. |
Response Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
tags |
No |
List<resource_tag> |
The tag list. For details, see Table 3. |
sys_tags |
No |
List<resource_tag> |
The system tag list. This parameter is only available to users with the op_service permission. This field contains only one resource_tag structure key currently. The key is fixed at _sys_enterprise_project_id. The value is the ID of an enterprise project. Value 0 indicates the default enterprise project. For details, see Table 3. |
Example Request
Querying tags of a general purpose file system whose name is bucketName with the project ID c80a2157ba1d46c0825265947342077c:
GET https://{endpoint}/v3/sfs/tms/c80a2157ba1d46c0825265947342077c/file-systems/bucketName/tags
Example Response
{ "tags":[ { "key":"key1", "value":"value1" }, { "key":"key2", "value":"value2" } ] }
Status Codes
- Normal
Status Code |
Description |
---|---|
200 |
Resource tags queried. |
- Abnormal
Status Code |
Description |
---|---|
400 |
Invalid tag parameter. |
401 |
Certification failed. |
403 |
Authentication failed. |
404 |
Resource not found. |
500 |
System error. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot