• Bare Metal Server

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

Stopping a BMS (Native OpenStack API)

Function

This interface is used to stop a single BMS.

Constraints

  • The BMS OS-EXT-STS:vm_state attribute (BMS status) must be active or error.
  • Currently, only forcible stopping is supported.

URI

POST /v2.1/{project_id}/servers/{server_id}/action

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.

Request Message

  • Request parameters

    Parameter

    Type

    Mandatory

    Description

    os-stop

    Null or dictionary data structure [1]

    Yes

    Specifies the operation of stopping the BMS.

    [1] os-stop field data structure description

    Parameter

    Type

    Mandatory

    Description

    type

    String

    No

    Specifies the type of the BMS stopping operation.

    • SOFT: normal BMS stopping
    • HARD: Forcible BMS stopping
      NOTE:

      Currently, this parameter is invalid. All BMS stopping operations are forcible stopping.

  • Example request
    {
        "os-stop": {}
    }

Response Message

N/A

Returned Values

See section Common Returned Values.