• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Nova
  5. Tag Management
  6. Adding Tags of an ECS

Adding Tags of an ECS

This API is used to add tags to 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

PUT /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

Request parameters

Table 2 describes the request parameters.

Table 2 Request parameters

Parameter

Mandatory

Type

Description

tags

Yes

List

Specifies ECS tags.

A maximum of 50 tags can be configured, and each tag can contain up to 80 characters.

Examples

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

Description

The following table describes tags, either of which is reserved by default.

Tag Name

Description

__type_baremetal

Specifies that the server is a BMS.

__type_virtual

Specifies that the server is an ECS.

Returned Values

See General Request Returned Values.