Help Center/ Direct Connect/ eu-west-0-api/ API/ Tag management/ Querying Tags by Resource Type
Updated on 2024-07-25 GMT+08:00

Querying Tags by Resource Type

Function

This API is used to query the tags of a resource type in a specific project. TMS uses this API to list tags created by a tenant to facilitate tag creation and resource filtering on the console.

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

Specifies the project ID.

resource_type

Yes

String

Specifies the Direct Connect resource type.

  • dc-directconnect: connection
  • dc-vgw: virtual gateway
  • dc-vif: virtual interface

Enumeration values:

  • dc-directconnect
  • dc-vgw
  • dc-vif

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

tags

Array of Tag objects

Specifies the tags.

request_id

String

Specifies the request ID.

Table 3 Tag

Parameter

Type

Description

Example Requests

GET https://{dc_endpoint}/v3/ed28c294165741faaeccab26913122a1/dc-directconnect/tags

Example Responses

Status code: 200

OK

{
  "tags" : [ {
    "key" : "department",
    "value" : "finance"
  } ]
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.