Updated on 2022-08-06 GMT+08:00

Querying Tag of a Specified Instance

Function

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

URI

GET /v1.0/{project_id}/instances/{instance_id}/tags

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

instance_id

Yes

String

Instance ID.

Request

None

Response

When the status code is 200, the response parameters are as follows.

Table 1 Parameter description

Parameter

Type

Description

tags

Array of Objects

List of tags. For details, see Table 2.

Table 2 tags parameters

Parameter

Type

Description

key

String

Tag key, which

  • Cannot be left blank.
  • Must be unique.
  • Can contain a maximum of 36 characters.

value

String

Tag value, which

  • Can contain a maximum of 43 characters.
  • Can be an empty string.

Example response

When the status code is 200, the response parameters are as follows.

{
    "tags": [
        {
            "key": "001",
            "value": "002"
        },
        {
            "key": "003",
            "value": "004"
        }
    ]
}

Return Value

Return Value

Description

200

Instance tags queried successfully.

Error Codes

None