• Bare Metal Server

bms
  1. Help Center
  2. Bare Metal Server
  3. API Reference
  4. API
  5. BMS Status Management (Native OpenStack APIs)
  6. Modifying Specified BMS Metadata (Native OpenStack API)

Modifying Specified BMS Metadata (Native OpenStack API)

Function

This interface is used to modify specified BMS metadata.

Constraints

The BMS OS-EXT-STS:vm_state attribute (BMS status) must be active, stopped, paused, or suspended.

URI

PUT /v2.1/{project_id}/servers/{server_id}/metadata/{key}

Table 1 lists the parameters.

Table 1 Parameter description

Parameter

Mandatory

Description

project_id

Yes

Specifies the project ID.

server_id

Yes

Specifies the BMS ID.

key

Yes

Specifies the BMS metadata key value to be modified.

Request Message

  • Request parameters

    Parameter

    Type

    Mandatory

    Description

    meta

    Dictionary data structure [1]

    Yes

    Specifies the user-defined metadata key and value pair.

    [1] meta field data structure description

    Parameter

    Type

    Mandatory

    Description

    User-defined field key and value pair

    String

    Yes

    Specifies the user-defined metadata key and value pair.

  • Example request
    {
        "meta": {
            "key": "value"
        }
    }

Response Message

  • Response parameters

    Parameter

    Type

    Description

    meta

    Dictionary data structure [2]

    Specifies the user-defined metadata key and value pair.

    [2] meta field data structure description

    Parameter

    Type

    Description

    User-defined field key and value pair

    String

    Specifies the user-defined metadata key and value pair.

    The maximum size for each metadata key and value pair is 255 bytes.

  • Example response
    {
        "meta": {
            "key": "value"
        }
    } 

Returned Values

See section Common Returned Values.