• Elastic Cloud Server

ecs
  1. Help Center
  2. Elastic Cloud Server
  3. API Reference
  4. OpenStack Nova APIs
  5. Tag Management
  6. Querying Tags of an ECS

Querying Tags of an ECS

This interface is used to query all tags of an ECS.

You are required to use the HTTP header X-OpenStack-Nova-API-Version: 2.26 to specify the microversion on the client.

URI

GET /v2.1/{project_id}/servers/{server_id}/tags

Table 1 describes the parameters in the URI.
Table 1 Parameter description

Parameter

Mandatory

Description

project_id

Yes

Specifies the project ID.

server_id

Yes

Specifies the ECS ID.

Request

N/A

Response

Response parameters

Table 2 describes the response parameters.

Table 2 Response parameters

Parameter

Type

Description

tags

List

Specifies the tags of an ECS.

Tag functions have been upgraded on the public cloud. After the upgrade, the tag values returned by the system comply with the following rules:

  • The key and value of a tag are connected using an equal sign (=), for example, key=value.
  • If the value is empty, only the key is returned.

For more details about upgraded tag functions, see section Tag Types.

Examples

  • Example request

    None

  • Example response
    { 
    "tags": ["baz=xyy", "foo", "qux"]
    }

Returned Values

See General Request Returned Values.