• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Nova
  5. Extend Server Actions
  6. Stopping an ECS

Stopping an ECS

Function Description

This interface is used to stop an ECS.

Interface Format

Method

URI

Description

POST

/v2/{tenant_id}/servers/{server_id}/action

/v2.1/{tenant_id}/servers/{server_id}/action

Stops an ECS.

Restrictions

  • The ECS must be in the active or error state. That is, the value of the OS-EXT-STS:vm_state attribute of the ECS must be active or error.
  • BMSs can only be forcibly stopped.

Expanded Interface

N/A

Request Parameter

Parameter

Type

Mandatory

Description

os-stop

Dict

Yes

Stops an ECS.

os-stop parameter information

Parameter

Type

Mandatory

Description

type

String

No

  • SOFT: soft stop (default).
  • HARD: forcible stop.

Response Parameter

N/A

Request Example

POST /v2/e72b9b77c6b949da851487dfbc0a7ca0/servers/0ee24b9b-2410-402b-a654-b3ecf53e63e0/action
POST /v2.1/e72b9b77c6b949da851487dfbc0a7ca0/servers/0ee24b9b-2410-402b-a654-b3ecf53e63e0/action
{ 
"os-stop": {
    "type" : "HARD"
}
 }

Returned Values

For details, see section General Request Returned Values.

Error Code

Table 1 Task error code

Error Code

Description

404

Instance could not be found

The target ECS does not exist.