Skip to navigation

Precheck a cloud VM resize

Checks whether a cloud VM can take a requested CPU, memory, or root-disk change before you start the resize. Requires scope: vm.write.

# Example request with curl (set IBEE_API_TOKEN to a platform API token and WORKSPACE_ID to the workspace first).
# VM_ID: Virtual machine ID
curl -X POST "https://api.ibee.ai/v1/compute/cloud-vms/$VM_ID/actions/resize/precheck?workspace_id=$WORKSPACE_ID" \
-H "Authorization: Bearer $IBEE_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"cpu": 1, "ram_mb": 1}'

Authentication

AuthorizationBearer

IBEE platform API token. Production tokens start with ibee_prod_key_; development tokens start with ibee_dev_key_. Use a token only with its matching gateway environment.

Path parameters

vm_idstringRequired
Virtual machine ID.

Query parameters

workspace_idstringRequiredformat: "^[1-9][0-9]*$">=1 character

The positive numeric workspace ID to scope this request to. Zero, negative, and non-numeric values are rejected.

Request

This endpoint expects an object.
cpuintegerOptional1-256
Target vCPUs.
ram_mbintegerOptional257-2097152
Target memory in MB.
disk_gbintegerOptional1-10000
Target root disk size in GB.

Response

Resize decision returned successfully.
decisionenum
  • in_place: the change can be applied on the current host.
  • migration_required: the VM must move to another host first.
  • blocked: the change cannot be made; see reasons.
Allowed values:
reasonslist of strings
Why the decision was reached.
warningslist of strings

Non-blocking warnings about the change.

migration_checklistlist of strings
Items to confirm before a migration.
migration_stepslist of strings
Steps a migration would perform.
requires_stopboolean
Whether the VM must be stopped for the change.
downtime_expectedboolean
Whether the change interrupts the VM.
no_changesboolean
True when the target shape equals the current one.
current_statestring
VM lifecycle status recorded by the engine.
currentobject

A VM shape: vCPUs, memory and root disk.

targetobject

A VM shape: vCPUs, memory and root disk.

modeenum or nullOptional

Same values as decision; present when the engine reports the mode separately.

Allowed values:
live_statestring or nullOptional
Power state observed on the host, when available.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
413
Content Too Large Error
422
Unprocessable Entity Error
423
Locked Error
429
Too Many Requests Error
500
Internal Server Error
502
Bad Gateway Error
503
Service Unavailable Error
504
Gateway Timeout Error