instances, inst
Subcommands
- list — List instances
- get — Get instance details
- create — Create a new instance
- update — Update an existing instance
- delete — Delete an instance
- start — Start an instance
- stop — Stop an instance
- reboot — Reboot an instance
- snapshot — Create a snapshot from an instance
- sshkey — Get an instance’s SSH key
- consoleoutput — Get instance console output
- consolesession — Get a VNC console session URL
list
List compute instances, optionally filtered by organization, project, network, or region.Flags
| Flag | Description |
|---|---|
--org string | Organization ID |
--project string | Project ID |
--network string | Network ID |
--region string | Region ID |
--json | Output in JSON format |
Example
get
Get details for a specific instance in JSON format.Flags
| Flag | Description |
|---|---|
--id string | Instance ID |
--org string | Organization ID |
create
Create a new compute instance. Accepts input from a JSON file or stdin. Optionally supply a cloud-init configuration.Flags
| Flag | Description |
|---|---|
-f, --file string | Path to a JSON file |
--stdin | Read JSON from standard input |
--cloud-init-path string | Path to a cloud-init YAML file |
--dry-run | Preview the request payload without persisting |
-y, --yes | Automatically confirm creation |
Examples
update
Update an existing instance.Flags
| Flag | Description |
|---|---|
--id string | Instance ID |
--org string | Organization ID |
-f, --file string | Path to a JSON file |
--stdin | Read JSON from standard input |
--dry-run | Preview the request payload without persisting |
-y, --yes | Automatically confirm update |
Examples
delete
Delete an existing instance.Flags
| Flag | Description |
|---|---|
--id string | Instance ID |
--org string | Organization ID |
--dry-run | Preview the request payload without persisting |
-y, --yes | Automatically confirm deletion |
start
Start a stopped instance.Flags
| Flag | Description |
|---|---|
--id string | Instance ID |
--org string | Organization ID |
--dry-run | Preview the request payload without persisting |
-y, --yes | Automatically confirm start |
stop
Stop a running instance.Flags
| Flag | Description |
|---|---|
--id string | Instance ID |
--org string | Organization ID |
--dry-run | Preview the request payload without persisting |
-y, --yes | Automatically confirm stop |
reboot
Reboot an instance. Use--hard for a hard reboot.
Flags
| Flag | Description |
|---|---|
--id string | Instance ID |
--org string | Organization ID |
--hard | Use hard reboot |
--dry-run | Preview the request payload without persisting |
-y, --yes | Automatically confirm reboot |
snapshot
Create an image snapshot from an instance. Accepts input from a JSON file or stdin.Flags
| Flag | Description |
|---|---|
--id string | Instance ID |
--org string | Organization ID |
-f, --file string | Path to a JSON file |
--stdin | Read JSON from standard input |
--dry-run | Preview the request payload without persisting |
-y, --yes | Automatically confirm snapshot |
Examples
sshkey
Get the SSH key for an instance in JSON format.Flags
| Flag | Description |
|---|---|
--id string | Instance ID |
--org string | Organization ID |
consoleoutput
Retrieve the serial console output of an instance.Flags
| Flag | Description |
|---|---|
--id string | Instance ID |
--org string | Organization ID |
--length int | Output length in bytes (0 uses API default) |
--json | Output in JSON format |
consolesession
Get a VNC console session URL for an instance.Flags
| Flag | Description |
|---|---|
--id string | Instance ID |
--org string | Organization ID |