curl -sS -X POST "$BMA_BASE_URL/v1/machines/<machine_id>/pause" \
-H "x-api-key: $BMA_API_KEY" \
-H "bma-workspace-id: $BMA_PROJECT_ID"{
"type": "machine_power_status",
"machine_id": "<string>",
"connection_state": "online",
"power_state": "running"
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>"
},
"request_id": "<string>"
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>"
},
"request_id": "<string>"
}Machines
Pause a running machine
POST
/
v1
/
machines
/
{machine_id}
/
pause
curl -sS -X POST "$BMA_BASE_URL/v1/machines/<machine_id>/pause" \
-H "x-api-key: $BMA_API_KEY" \
-H "bma-workspace-id: $BMA_PROJECT_ID"{
"type": "machine_power_status",
"machine_id": "<string>",
"connection_state": "online",
"power_state": "running"
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>"
},
"request_id": "<string>"
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>"
},
"request_id": "<string>"
}请求头
响应
Success.
Compute state of a pool machine. paused keeps the disk (and memory when the provider supports it) without compute; resuming means a resume or restore is in flight; archived means the machine image is stored durably and is restored on the next access.
可用选项:
running, pausing, paused, resuming, archiving, archived