This API is used to query tags of a specified resource.
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. |
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. |
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. |
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
{
"tags":[
{
"key":"key1",
"value":"value1"
},
{
"key":"key2",
"value":"value2"
}
]
}
Status Code |
Description |
|---|---|
200 |
Resource tags queried. |
Status Code |
Description |
|---|---|
400 |
Invalid tag parameter. |
401 |
Certification failed. |
403 |
Authentication failed. |
404 |
Resource not found. |
500 |
System error. |