Update Vm
PATCH /v1/vms/{vm_id}
Change a running VM: memory, vCPU count, egress policy, vault bindings, and what
happens when it ends (snapshot_on_terminate, snapshot_name, auto_suspend,
auto_resume). A vCPU change is applied first and the call waits for it; vCPUs can
grow only back up to the count the running VM started with. Memory and egress
changes are applied in the background and may take effect after the response.
Authentication
Requires authentication via: OAuth2PasswordBearer.
Parameters
| Name | In | Type | Required | Description | Constraints |
|---|---|---|---|---|---|
vm_id | path | string | Yes | ||
X-API-Key | header | string | null | No | nullable |
Request Body
Required: Yes
application/json
Resolved schema:
{
"properties": {
"memory_mb": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Memory Mb"
},
"vcpu_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Vcpu Count"
},
"egress_policy": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
],
"title": "Egress Policy"
},
"snapshot_on_terminate": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Snapshot On Terminate"
},
"snapshot_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Snapshot Name"
},
"auto_suspend": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Auto Suspend"
},
"auto_resume": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Auto Resume"
},
"vault_ids": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Vault Ids"
}
},
"type": "object",
"title": "VMUpdateRequest"
}
Field details:
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
memory_mb | integer | null | No | nullable | |
vcpu_count | integer | null | No | nullable | |
egress_policy | object | null | No | nullable | |
snapshot_on_terminate | boolean | null | No | nullable | |
snapshot_name | string | null | No | nullable | |
auto_suspend | boolean | null | No | nullable | |
auto_resume | boolean | null | No | nullable | |
vault_ids | array<string> | null | No | nullable | |
vault_ids[] | string | No |
Responses
200
Successful Response
application/json
Resolved schema:
{}
400
Invalid memory, vCPU count or egress policy.
No response body.
401
No credentials, or the Bearer token / X-API-Key is invalid.
No response body.
403
The account is disabled, or a guest token was used; or the VM belongs to another account, your plan does not allow that vCPU count, or a vault is not yours.
No response body.
404
VM not found.
No response body.
409
The VM is not running, or the vCPU change was refused (above the VM's maximum, or a snapshot is in progress).
No response body.
422
Validation Error
application/json
Resolved schema:
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
Field details:
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
detail | array<object> | No | ||
detail[] | object | No | ||
detail[].loc | array<string | integer> | No | ||
detail[].loc[] | string | integer | No | ||
detail[].msg | string | No | ||
detail[].type | string | No |
503
The VM is temporarily unreachable, or the vCPU change failed and was not applied.
No response body.
504
The VM did not answer in time; the vCPU change may still apply.
No response body.