Querying Resource Tags
Function
This API is used to query resource tags.
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 |
Specifies the project ID. |
resource_type |
Yes |
String |
Specifies the Direct Connect resource type.
Enumeration values:
|
resource_id |
Yes |
String |
Specifies the resource ID. |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
tags |
Array of Tag objects |
Specifies the tag list. |
sys_tags |
Array of Tag objects |
Specifies the list of queried tags. If no tag is matched, an empty array is returned. |
request_id |
String |
Specifies the request ID. |
Parameter |
Type |
Description |
---|---|---|
key |
String |
Specifies the tag key. The key can contain a maximum of 36 Unicode characters, including letters, digits, hyphens (-), and underscores (_). Minimum: 0 Maximum: 36 |
value |
String |
Specifies the tag value. The value can contain a maximum of 43 Unicode characters, including letters, digits, hyphens (-), underscores (_), and periods (.). Minimum: 0 Maximum: 43 |
Example Requests
Querying tags of a resource
https://{endpoint}/v3/cfa563efb77d4b6d9960781d82530fd8/dc-vgw/resource-instances/action
Example Responses
Status code: 200
OK
{ "request_id" : "80ef5f21-b81a-4546-b23d-84272507d330", "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.