Querying Tags of a DCS Instance

Function

This API is used to query the tags of an instance by its instance ID.

URI

GET /v2/{project_id}/instances/{instance_id}/tags

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details, see Obtaining a Project ID.

instance_id

Yes

String

Instance ID.

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

tags

Array of QueryResourceTag objects

Tag list.

Table 3 QueryResourceTag

Parameter

Type

Description

key

String

Tag key.

value

String

Tag value.

Example Requests

GET https://{dcs_endpoint}/v2/{project_id}/instances/{instance_id}/tags

Example Responses

Status code: 200

Instance tags queried successfully.

{
  "tags" : [ {
    "value" : "a",
    "key" : "1"
  }, {
    "value" : "b",
    "key" : "2"
  } ]
}

Status Codes

Status Code

Description

200

Instance tags queried successfully.

Error Codes

See Error Codes.