Deze pagina is nog niet beschikbaar in uw eigen taal. We werken er hard aan om meer taalversies toe te voegen. Bedankt voor uw steun.

Querying Resource Tags

Updated on 2023-12-07 GMT+08:00

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

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

resource_id

Yes

String

Specifies the resource ID.

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

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.

Table 3 Tag

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

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback