Querying Resource Tags
Function
This API is used to query tags of resources of a specific type.
Calling Method
For details, see Calling APIs.
URI
GET /v3/{project_id}/{resource_type}/{resource_id}/tags
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID |
resource_id |
Yes |
String |
Resource ID |
resource_type |
Yes |
String |
Resource type.
|
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
tags |
Array of Tag objects |
Tags |
Parameter |
Type |
Description |
---|---|---|
key |
String |
Tag key. The value can contain a maximum of 36 Unicode characters, including uppercase letters, lowercase letters, digits, hyphens (-), and underscores (_). Minimum: 1 Maximum: 128 |
value |
String |
Tag value.
Minimum: 0 Maximum: 255 |
Example Requests
Querying tags of an enterprise router
https://{erouter_endpoint}/v3/cfa563efb77d4b6d9960781d82530fd8/instance/f1a28dfd-186f-4625-b6b1-f05e5e8609c0/tags
Example Responses
Status code: 200
OK
{ "tags" : [ { "key" : "key2", "value" : "value2" }, { "key" : "key1", "value" : "value1" }, { "key" : "key3", "value" : "value3" } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.