Help Center/ Enterprise Router/ API Reference/ APIs/ Tags/ Querying Project Tags
Updated on 2026-03-20 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.

Authorization Information

Each account root user has all the permissions required to call all APIs, but IAM users must be assigned the following required identity policy-based permissions. For details about the required permissions, see Permissions Policies and Supported Actions.

Action

Access Level

Resource Type (*: required)

Condition Key

Alias

Dependencies

er:tags:list

List

-

-

-

-

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

Tagged resource type.

  • instance: enterprise router

  • route-table: route table

  • vpc-attachment: VPC attachment

  • vgw-attachment: virtual gateway attachment

  • peering-attachment: peering connection attachment

  • vpn-attachment: VPN gateway attachment

  • gdgw-attachment: global DC gateway attachment

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

tags

Array of Tags objects

Tags

total_count

Integer

Total number of records.

Table 3 Tags

Parameter

Type

Description

key

String

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

Maximum: 128

values

Array of strings

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

Maximum: 255

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.