Reviewed-by: Muller, Martin <martin.muller@t-systems.com> Co-authored-by: lizaoxu <lizaoxu@huawei.com> Co-committed-by: lizaoxu <lizaoxu@huawei.com>
17 KiB
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.
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 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. |