Instances¶
Create, change, act on and delete instances; consoles and console logs.
Paths are relative to your API address. See Authentication and Operations. Changes that answer 202 Accepted return an operation to follow.
Request and response examples are generated from the schema; the tables under Schemas are the reference.
Collect a console URL or console log¶
POST /
The encrypted result of a console request, once, to whoever asked and from the same session or API key. Anyone else, a second call, or a call after the collection window gets 404.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
console_request_id |
path | string | No | ||
org_id |
path | string | No | ||
project_id |
path | string | No |
Responses
Create an instance¶
POST /
Creates an instance in one location from a size, an image and a network. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No |
Request body
{
"display_name": "string",
"execute_before": "2022-04-13T15:42:05.901Z",
"fixed_ip": "string",
"image": "string",
"image_id": "string",
"image_version": "string",
"load_balancer": {
"pool_id": "string",
"port": 0,
"weight": 0
},
"location": "string",
"network_id": "string",
"offering": "string",
"public_ip": true,
"public_ip_id": "string",
"security_group_ids": [
"string"
],
"security_group_templates": [
"ssh"
],
"server_group_id": "string",
"ssh_key_id": "string",
"tags": {},
"user_data": "string",
"volumes": [
{
"new": {
"display_name": "string",
"size_gb": 0,
"volume_type": "string"
},
"volume_id": "string"
}
]
}
Responses
Rename an instance¶
PATCH /
Changes the instance's name or description. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
resource_id |
path | string | No |
Request body
Set an instance's tags¶
PUT /
Replaces the instance's tags with the whole set given and writes them to it in its location with the nx. prefix, keeping every tag set there without the prefix. Send the tags_version you read in If-Match: a set changed since is 412. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
if-match |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
resource_id |
path | string | No |
Request body
Delete an instance¶
DELETE /
Deletes the instance and its system disk. Attached volumes, public IPs and security groups stay, except a volume the location is set to delete with it. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
server_id |
path | string | No |
Responses
Get what an instance forwards for¶
GET /
Each network interface of the instance: the private ranges NubeStack Cloud set it to forward for, address pairs set with the cloud's own tools, and whether the location offers forwarding. From the last inventory read.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
org_id |
path | string | No | ||
project_id |
path | string | No | ||
server_id |
path | string | No |
Responses
Attach an instance to a network¶
POST /
Adds a network interface on another network of the same location. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
server_id |
path | string | No |
Request body
Attach a volume¶
POST /
Attaches a volume of the same location to the instance. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
server_id |
path | string | No |
Request body
Save an instance as an image¶
POST /
Makes a private image of the instance's disk, to start new instances from. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
server_id |
path | string | No |
Request body
Detach an instance from a network¶
POST /
Removes the instance's interface on a network. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
server_id |
path | string | No |
Request body
Detach a volume¶
POST /
Detaches a volume from the instance. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
server_id |
path | string | No |
Request body
Lock an instance¶
POST /
Stops anyone changing or deleting the instance until it is unlocked. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
server_id |
path | string | No |
Request body
Pause an instance¶
POST /
Freezes the instance in memory; it keeps its resources. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
server_id |
path | string | No |
Request body
Restart an instance¶
POST /
Restarts the instance, gracefully or, with hard, at once. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
server_id |
path | string | No |
Request body
Rebuild an instance¶
POST /
Reinstalls the instance from an image; data on its root disk is lost. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
server_id |
path | string | No |
Request body
Open an instance's console¶
POST /
Asks the location for a console URL (noVNC), encrypted to the public key you send. Accepted at once: follow the returned operation, then collect the result once from the console request. The URL opens the console without any other credential until it expires; NubeStack Cloud keeps no copy.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
server_id |
path | string | No |
Request body
Read an instance's console log¶
POST /
Asks the location for the last lines of the instance's console log (its boot output), encrypted to the public key you send. Accepted at once: follow the returned operation, then collect the result once. NubeStack Cloud does not redact the log and keeps no copy: it can contain passwords and keys the instance printed.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
server_id |
path | string | No |
Request body
Rescue an instance¶
POST /
Starts the instance from a rescue image with its own disk attached, to repair it. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
server_id |
path | string | No |
Request body
Resize an instance¶
POST /
Moves the instance to another size from the location's catalog. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
server_id |
path | string | No |
Request body
Resume an instance¶
POST /
Starts a suspended instance again. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
server_id |
path | string | No |
Request body
Set what an instance forwards for¶
POST /
Replaces the private address ranges the instance's interface on one network may send from and receive for, so it can route, NAT or tunnel traffic for them; an empty list stops it. Address pairs set with the cloud's own tools stay. Offered only in locations whose cloud filters forwarded traffic as NubeStack Cloud proved it. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
server_id |
path | string | No |
Request body
Set an instance's metadata¶
POST /
Replaces the instance's metadata key-value pairs. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
server_id |
path | string | No |
Request body
Set an instance's security groups¶
POST /
Replaces the security groups on the instance's network interfaces. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
server_id |
path | string | No |
Request body
Shelve an instance¶
POST /
Stops the instance and frees its compute resources; its disk is kept. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
server_id |
path | string | No |
Request body
Start an instance¶
POST /
Starts a stopped instance. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
server_id |
path | string | No |
Request body
Stop an instance¶
POST /
Shuts the instance down. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
server_id |
path | string | No |
Request body
Suspend an instance¶
POST /
Saves the instance's memory to disk and stops it. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
server_id |
path | string | No |
Request body
Unlock an instance¶
POST /
Allows changes to a locked instance again. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
server_id |
path | string | No |
Request body
Unpause an instance¶
POST /
Lets a paused instance run again. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
server_id |
path | string | No |
Request body
End a rescue¶
POST /
Starts the instance from its own disk again. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
server_id |
path | string | No |
Request body
Unshelve an instance¶
POST /
Starts a shelved instance again. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
server_id |
path | string | No |
Request body
Schemas¶
Accepted¶
| Name | Type | Description |
|---|---|---|
operation |
OperationLink |
ActionBody¶
| Name | Type | Description |
|---|---|---|
execute_before |
string(date-time) | null |
AttachBody¶
| Name | Type | Description |
|---|---|---|
execute_before |
string(date-time) | null | |
volume_id |
string |
ConsoleBody¶
| Name | Type | Description |
|---|---|---|
protocol |
string | The console type: novnc, a console a browser opens without a plug-in. |
public_key |
PublicJwk | The key the console URL is encrypted to. |
ConsoleCollected¶
| Name | Type | Description |
|---|---|---|
collected_at |
string(date-time) | |
expires_at |
string(date-time) | When the console URL's token stops opening a console (a log: when the collection window ended). |
id |
string | The console request (csr_…). |
jwe |
string | |
kind |
string | console or console_output. |
session_timeout |
boolean | null | Whether the location closes an open console when its token expires (Nova's enforce_session_timeout); null when the location has not declared it. |
ConsoleOutputBody¶
| Name | Type | Description |
|---|---|---|
lines |
integer | How many lines from the end of the log, 1-2000. |
public_key |
PublicJwk | The key the log is encrypted to. |
Forwarding¶
| Name | Type | Description |
|---|---|---|
available |
boolean | Whether the instance's location offers forwarding. |
id |
string | |
interfaces |
Array<ForwardingInterface> | |
withheld |
boolean | The location's network data is withheld. |
ForwardingBody¶
| Name | Type | Description |
|---|---|---|
cidrs |
Array<string> | |
execute_before |
string(date-time) | null | |
network_id |
string |
ForwardingInterface¶
| Name | Type | Description |
|---|---|---|
addresses |
Array<string> | The interface's own addresses. |
forwarding |
Array<string> | The ranges NubeStack Cloud set it to forward for. |
network_id |
string | null | The network (net_…); null for one not read. |
network_name |
string | null | |
observed_at |
string(date-time) | null | |
other_pairs |
Array<string> | Address pairs set with the cloud's own tools (address or address mac). |
port_security_enabled |
boolean | null | False: the interface sends and receives for any address already. |
HTTPValidationError¶
| Name | Type | Description |
|---|---|---|
detail |
Array<ValidationError> |
ImageBody¶
| Name | Type | Description |
|---|---|---|
display_name |
string | |
execute_before |
string(date-time) | null |
InterfaceBody¶
| Name | Type | Description |
|---|---|---|
execute_before |
string(date-time) | null | |
network_id |
string |
MetadataBody¶
| Name | Type | Description |
|---|---|---|
execute_before |
string(date-time) | null | |
metadata |
NewVolumeBody¶
| Name | Type | Description |
|---|---|---|
display_name |
string | |
size_gb |
integer | |
volume_type |
string |
OperationLink¶
| Name | Type | Description |
|---|---|---|
href |
string | Where to read the operation; also the Location header. |
id |
string | The operation's ID (op_…). |
state |
string | null | Its state when accepted, normally queued. |
PoolMemberBody¶
| Name | Type | Description |
|---|---|---|
pool_id |
string | A pool (lbp_) of a load balancer of this project. |
port |
integer | The port the instance serves on. |
weight |
integer |
PublicJwk¶
| Name | Type | Description |
|---|---|---|
crv |
string | |
kty |
string | |
x |
string | |
y |
string |
RebootBody¶
| Name | Type | Description |
|---|---|---|
execute_before |
string(date-time) | null | |
type |
string |
RebuildBody¶
| Name | Type | Description |
|---|---|---|
execute_before |
string(date-time) | null | |
image |
string | null | |
image_id |
string | null | |
image_version |
string | null |
ResizeBody¶
| Name | Type | Description |
|---|---|---|
execute_before |
string(date-time) | null | |
offering |
string |
ServerCreateBody¶
| Name | Type | Description |
|---|---|---|
display_name |
string | |
execute_before |
string(date-time) | null | |
fixed_ip |
string | null | |
image |
string | null | |
image_id |
string | null | |
image_version |
string | null | |
load_balancer |
PoolMemberBody | A pool of one of this project's load balancers in the same location that the instance joins once it runs, at its private address on network_id. If joining fails, the instance stays and the operation ends partially_succeeded. Deleting the instance later leaves the member in the pool. |
location |
string | |
network_id |
string | null | |
offering |
string | |
public_ip |
boolean | |
public_ip_id |
string | null | |
security_group_ids |
Array<string> | |
security_group_templates |
Array<string> | Inbound rules from anywhere (0.0.0.0/0): ssh is TCP 22, web is TCP 80 and 443. A rule that any group in security_group_ids already allows is not added again; the others are added to the first group named there, the cloud's default group included, and no group is created. When no group is named, one new group ` is created with them (-2, -3`, ... when that name is taken in the organization). |
server_group_id |
string | null | A server group of this project in the same location. The instance joins it now; it cannot join, leave or change group later. |
ssh_key_id |
string | null | |
tags |
Labels key: value NubeStack Cloud keeps and writes to the resource in its location as `nx. (a volume's metadata key nx.), keeping its other tags. At most 20; a key is 1-32 of a-z, 0-9, _, ., -, starting with a letter; a value is 0-24 of A-Z, a-z, 0-9, _, ., :, -`. An organization uses at most 50 keys. |
|
user_data |
string | null | |
volumes |
Array<ServerVolumeBody> | Up to 8 data volumes, attached in this order once the instance runs: each an existing volume (volume_id) or a new empty one (new). New volumes are made before the instance. If an attachment fails, the instance and every volume stay, and the operation ends partially_succeeded. Deleting the instance later detaches its volumes and keeps them. |
ServerGroupsBody¶
| Name | Type | Description |
|---|---|---|
execute_before |
string(date-time) | null | |
security_group_ids |
Array<string> |
ServerVolumeBody¶
| Name | Type | Description |
|---|---|---|
new |
NewVolumeBody | A new empty volume. |
volume_id |
string | null | An existing volume of this project in the same location, available and attached to nothing. |
TagsBody¶
| Name | Type | Description |
|---|---|---|
execute_before |
string(date-time) | null | |
tags |
Labels key: value NubeStack Cloud keeps and writes to the resource in its location as `nx. (a volume's metadata key nx.), keeping its other tags. At most 20; a key is 1-32 of a-z, 0-9, _, ., -, starting with a letter; a value is 0-24 of A-Z, a-z, 0-9, _, ., :, -`. An organization uses at most 50 keys. |
UpdateBody¶
| Name | Type | Description |
|---|---|---|
description |
string | null | |
display_name |
string | |
execute_before |
string(date-time) | null |
ValidationError¶
| Name | Type | Description |
|---|---|---|
ctx |
||
input |
||
loc |
Array<> | |
msg |
string | |
type |
string |