Help Center/ Enterprise Router/ API Reference/ APIs/ Tags/ Querying Project Tags
Updated on 2024-04-25 GMT+08:00

Querying Project 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}/tags

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

resource_type

Yes

String

Resource type.

  • instance: enterprise router

  • route-table: route table

  • vpc-attachment: VPC attachment

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

tags

Array of Tags objects

Tags

Table 3 Tags

Parameter

Type

Description

key

String

Tag key, which cannot be empty and can contain a maximum of 127 Unicode characters.

values

Array of strings

Tag values. Each value can contain a maximum of 255 Unicode characters.

Example Requests

Querying tags of an enterprise router

https://{erouter_endpoint}/v3/cfa563efb77d4b6d9960781d82530fd8/instance/tags

Example Responses

Status code: 200

OK

{
  "tags" : [ {
    "key" : "keys",
    "values" : [ "value" ]
  }, {
    "key" : "key3",
    "values" : [ "value3", "value33" ]
  }, {
    "key" : "key1",
    "values" : [ "value1" ]
  }, {
    "key" : "key2",
    "values" : [ "value2", "value22" ]
  } ]
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.