This required adding support to openapi.yml. Even though the route was available for both web and api, you couldn't reach it via api due to committee.
702 lines
18 KiB
Plaintext
702 lines
18 KiB
Plaintext
CLI to interact with Ubicloud
|
|
|
|
Usage:
|
|
ubi command [command-options] ...
|
|
|
|
Examples:
|
|
ubi vm list # List virtual machines
|
|
ubi help vm # Get help for vm subcommand
|
|
|
|
Commands:
|
|
ai Manage AI features
|
|
fw Manage firewalls
|
|
help Get command help
|
|
kc Manage Kubernetes clusters
|
|
lb Manage load balancers
|
|
pg Manage PostgreSQL databases
|
|
ps Manage private subnets
|
|
version Display CLI program version
|
|
vm Manage virtual machines
|
|
|
|
|
|
Manage AI features
|
|
|
|
Usage:
|
|
ubi ai [command] ...
|
|
|
|
Commands:
|
|
api-key Manage AI inference API keys
|
|
|
|
|
|
Manage AI inference API keys
|
|
|
|
Usage:
|
|
ubi ai api-key [command] ...
|
|
ubi ai api-key api-key-id [post-command] ...
|
|
|
|
Commands:
|
|
create Create an inference API key
|
|
list List inference API keys
|
|
|
|
Post Commands:
|
|
destroy Destroy an inference API key
|
|
show Show details for an inference API key
|
|
|
|
|
|
Create an inference API key
|
|
|
|
Usage:
|
|
ubi ai api-key create
|
|
|
|
|
|
List inference API keys
|
|
|
|
Usage:
|
|
ubi ai api-key list [options]
|
|
|
|
Options:
|
|
-N, --no-headers do not show headers
|
|
|
|
|
|
Destroy an inference API key
|
|
|
|
Usage:
|
|
ubi ai api-key api-key-id destroy [options]
|
|
|
|
Options:
|
|
-f, --force do not require confirmation
|
|
|
|
|
|
Show details for an inference API key
|
|
|
|
Usage:
|
|
ubi ai api-key api-key-id show
|
|
|
|
|
|
Manage firewalls
|
|
|
|
Usage:
|
|
ubi fw command [...]
|
|
ubi fw (location/fw-name | fw-id) post-command [...]
|
|
|
|
Commands:
|
|
list List firewalls
|
|
|
|
Post Commands:
|
|
add-rule Add a firewall rule
|
|
attach-subnet Attach a private subnet to a firewall
|
|
create Create a firewall
|
|
delete-rule Remove a firewall rule
|
|
destroy Destroy a firewall
|
|
detach-subnet Detch a private subnet from a firewall
|
|
show Show details for a firewall
|
|
|
|
|
|
List firewalls
|
|
|
|
Usage:
|
|
ubi fw list [options]
|
|
|
|
Options:
|
|
-f, --fields=fields show specific fields (comma separated)
|
|
-l, --location=location only show firewalls in given location
|
|
-N, --no-headers do not show headers
|
|
|
|
Allowed Option Values:
|
|
Fields: location name id
|
|
|
|
|
|
Add a firewall rule
|
|
|
|
Usage:
|
|
ubi fw (location/fw-name | fw-id) add-rule cidr
|
|
|
|
Options:
|
|
-s, --start-port=port starting (or only) port to allow (default: 0)
|
|
-e, --end-port=port ending port to allow (default: 65535)
|
|
|
|
|
|
Attach a private subnet to a firewall
|
|
|
|
Usage:
|
|
ubi fw (location/fw-name | fw-id) attach-subnet ps-id
|
|
|
|
|
|
Create a firewall
|
|
|
|
Usage:
|
|
ubi fw location/fw-name create [options]
|
|
|
|
Options:
|
|
-d, --description=desc description for firewall
|
|
|
|
|
|
Remove a firewall rule
|
|
|
|
Usage:
|
|
ubi fw (location/fw-name | fw-id) delete-rule rule-id
|
|
|
|
|
|
Destroy a firewall
|
|
|
|
Usage:
|
|
ubi fw (location/fw-name | fw-id) destroy [options]
|
|
|
|
Options:
|
|
-f, --force do not require confirmation
|
|
|
|
|
|
Detch a private subnet from a firewall
|
|
|
|
Usage:
|
|
ubi fw (location/fw-name | fw-id) detach-subnet ps-id
|
|
|
|
|
|
Show details for a firewall
|
|
|
|
Usage:
|
|
ubi fw (location/fw-name | fw-id) show [options]
|
|
|
|
Options:
|
|
-f, --fields=fields show specific fields (comma separated)
|
|
-n, --nic-fields=fields show specific nic fields (comma separated)
|
|
-p, --priv-subnet-fields=fields show specific private subnet fields (comma separated)
|
|
-r, --rule-fields=fields show specific firewall rule fields (comma separated)
|
|
|
|
Allowed Option Values:
|
|
Fields: id name location description firewall-rules private-subnets
|
|
Nic Fields: id name private-ipv4 private-ipv6 vm-name
|
|
Private Subnet Fields: id name state location net4 net6 nics
|
|
Firewall Rule Fields: id cidr port-range
|
|
|
|
|
|
Get command help
|
|
|
|
Usage:
|
|
ubi help [options] [command [subcommand]]
|
|
|
|
Options:
|
|
-r, --recursive also show documentation for all subcommands of command
|
|
-u, --usage only show usage
|
|
|
|
|
|
Manage Kubernetes clusters
|
|
|
|
Usage:
|
|
ubi kc command [...]
|
|
ubi kc (location/kc-name | kc-id) post-command [...]
|
|
|
|
Commands:
|
|
list List Kubernetes clusters
|
|
|
|
Post Commands:
|
|
create Create a Kubernetes cluster
|
|
destroy Destroy a Kubernetes cluster
|
|
kubeconfig Print kubeconfig.yaml for a Kubernetes cluster
|
|
show Show details for a Kubernetes cluster
|
|
|
|
|
|
List Kubernetes clusters
|
|
|
|
Usage:
|
|
ubi kc list [options]
|
|
|
|
Options:
|
|
-f, --fields=fields show specific fields (comma separated)
|
|
-l, --location=location only show Kubernetes clusters in given location
|
|
-N, --no-headers do not show headers
|
|
|
|
Allowed Option Values:
|
|
Fields: location name id display_state version cp_node_count
|
|
|
|
|
|
Create a Kubernetes cluster
|
|
|
|
Usage:
|
|
ubi kc location/kc-name create [options]
|
|
|
|
Options:
|
|
-v, --version=version Kubernetes version
|
|
-c, --cp-node-count=count Control plane node count
|
|
-w, --worker-node-count=count Worker node count
|
|
-z, --worker-size=size Worker size
|
|
|
|
Allowed Option Values:
|
|
Version: v1.33 v1.32
|
|
Control Plane Node Count: 1 3
|
|
|
|
|
|
Destroy a Kubernetes cluster
|
|
|
|
Usage:
|
|
ubi kc (location/kc-name | kc-id) destroy [options]
|
|
|
|
Options:
|
|
-f, --force do not require confirmation
|
|
|
|
|
|
Print kubeconfig.yaml for a Kubernetes cluster
|
|
|
|
Usage:
|
|
ubi kc (location/kc-name | kc-id) kubeconfig
|
|
|
|
|
|
Show details for a Kubernetes cluster
|
|
|
|
Usage:
|
|
ubi kc (location/kc-name | kc-id) show [options]
|
|
|
|
Options:
|
|
-f, --fields=fields show specific fields (comma separated)
|
|
-n, --nodepool-fields=fields show specific nodepool fields (comma separated)
|
|
-v, --vm-fields=fields show specific virtual machine fields (comma separated)
|
|
|
|
Allowed Option Values:
|
|
Fields: id name location display-state cp-node-count node-size version
|
|
nodepools cp-vms
|
|
Nodepool Fields: id name node-count node-size vms
|
|
Virtual Machine Fields: id name state location size unix-user
|
|
storage-size-gib ip6 ip4-enabled ip4
|
|
|
|
|
|
Manage load balancers
|
|
|
|
Usage:
|
|
ubi lb command [...]
|
|
ubi lb (location/lb-name | lb-id) post-command [...]
|
|
|
|
Commands:
|
|
list List load balancers
|
|
|
|
Post Commands:
|
|
attach-vm Attach a virtual machine to a load balancer
|
|
create Create a load balancer
|
|
destroy Destroy a load balancer
|
|
detach-vm Detach a virtual machine from a load balancer
|
|
show Show details for a load balancer
|
|
update Update a load balancer
|
|
|
|
|
|
List load balancers
|
|
|
|
Usage:
|
|
ubi lb list [options]
|
|
|
|
Options:
|
|
-f, --fields=fields show specific fields (comma separated)
|
|
-l, --location=location only show load balancers in given location
|
|
-N, --no-headers do not show headers
|
|
|
|
Allowed Option Values:
|
|
Fields: location name id src-port dst-port hostname
|
|
|
|
|
|
Attach a virtual machine to a load balancer
|
|
|
|
Usage:
|
|
ubi lb (location/lb-name | lb-id) attach-vm vm-id
|
|
|
|
|
|
Create a load balancer
|
|
|
|
Usage:
|
|
ubi lb location/lb-name create [options] ps-id src-port dst-port
|
|
|
|
Options:
|
|
-a, --algorithm=alg set the algorithm to use
|
|
-e, --check-endpoint=path set the health check endpoint (default: /up)
|
|
-p, --check-protocol=proto set the health check protocol
|
|
-s, --stack=stack set the stack
|
|
|
|
Allowed Option Values:
|
|
Algorithm: round_robin hash_based
|
|
Health Check Protocol: http https tcp
|
|
Stack: dual ipv4 ipv6
|
|
|
|
|
|
Destroy a load balancer
|
|
|
|
Usage:
|
|
ubi lb (location/lb-name | lb-id) destroy [options]
|
|
|
|
Options:
|
|
-f, --force do not require confirmation
|
|
|
|
|
|
Detach a virtual machine from a load balancer
|
|
|
|
Usage:
|
|
ubi lb (location/lb-name | lb-id) detach-vm vm-id
|
|
|
|
|
|
Show details for a load balancer
|
|
|
|
Usage:
|
|
ubi lb (location/lb-name | lb-id) show [options]
|
|
|
|
Options:
|
|
-f, --fields=fields show specific fields (comma separated)
|
|
|
|
Allowed Option Values:
|
|
Fields: id name state location hostname algorithm stack
|
|
health-check-endpoint health-check-protocol src-port dst-port subnet
|
|
vms
|
|
|
|
|
|
Update a load balancer
|
|
|
|
Usage:
|
|
ubi lb (location/lb-name | lb-id) update algorithm src-port dst-port health-check-endpoint [vm-id [...]]
|
|
|
|
|
|
Manage PostgreSQL databases
|
|
|
|
Usage:
|
|
ubi pg command [...]
|
|
ubi pg (location/pg-name | pg-id) [post-options] post-command [...]
|
|
|
|
Commands:
|
|
list List PostgreSQL databases
|
|
|
|
Post Commands:
|
|
add-firewall-rule Add a PostgreSQL firewall rule
|
|
add-metric-destination Add a PostgreSQL metric destination
|
|
create Create a PostgreSQL database
|
|
delete-firewall-rule Delete a PostgreSQL firewall rule
|
|
delete-metric-destination Delete a PostgreSQL metric destination
|
|
destroy Destroy a PostgreSQL database
|
|
pg_dump Dump a single PostgreSQL database using `pg_dump`
|
|
pg_dumpall Dump a entire PostgreSQL database cluster using `pg_dumpall`
|
|
psql Connect to a PostgreSQL database using `psql`
|
|
reset-superuser-password Reset the superuser password for a PostgreSQL database
|
|
restart Restart a PostgreSQL database cluster
|
|
restore Restore a PostgreSQL database backup to a new database
|
|
show Show details for a PostgreSQL database
|
|
|
|
Post Options:
|
|
-d, --dbname=name override database name
|
|
-U, --username=name override username
|
|
|
|
|
|
List PostgreSQL databases
|
|
|
|
Usage:
|
|
ubi pg list [options]
|
|
|
|
Options:
|
|
-f, --fields=fields show specific fields (comma separated)
|
|
-l, --location=location only show PostgreSQL databases in given location
|
|
-N, --no-headers do not show headers
|
|
|
|
Allowed Option Values:
|
|
Fields: location name id version flavor
|
|
|
|
|
|
Add a PostgreSQL firewall rule
|
|
|
|
Usage:
|
|
ubi pg (location/pg-name | pg-id) add-firewall-rule cidr
|
|
|
|
|
|
Add a PostgreSQL metric destination
|
|
|
|
Usage:
|
|
ubi pg (location/pg-name | pg-id) add-metric-destination username password url
|
|
|
|
|
|
Create a PostgreSQL database
|
|
|
|
Usage:
|
|
ubi pg location/pg-name create [options]
|
|
|
|
Options:
|
|
-f, --flavor=type flavor
|
|
-h, --ha-type=type replication type
|
|
-s, --size=size server size
|
|
-S, --storage-size=size storage size GB
|
|
-v, --version=version PostgreSQL version
|
|
|
|
Allowed Option Values:
|
|
Flavor: standard paradedb lantern
|
|
Replication Type: none async sync
|
|
Size: standard-2 standard-4 standard-8 standard-16 standard-30 standard-60
|
|
burstable-1 burstable-2 c6gd.large c6gd.xlarge c6gd.2xlarge
|
|
c6gd.4xlarge c6gd.8xlarge c6gd.16xlarge m6id.large m6id.xlarge
|
|
m6id.2xlarge m6id.4xlarge m6id.8xlarge m6id.16xlarge m6gd.large
|
|
m6gd.xlarge m6gd.2xlarge m6gd.4xlarge m6gd.8xlarge m6gd.16xlarge
|
|
m8gd.large m8gd.xlarge m8gd.2xlarge m8gd.4xlarge m8gd.8xlarge
|
|
m8gd.16xlarge
|
|
Storage Size: 16 32 64 128 256 512 1024 2048 4096
|
|
Version: 17 16
|
|
|
|
|
|
Delete a PostgreSQL firewall rule
|
|
|
|
Usage:
|
|
ubi pg (location/pg-name | pg-id) delete-firewall-rule rule-id
|
|
|
|
|
|
Delete a PostgreSQL metric destination
|
|
|
|
Usage:
|
|
ubi pg (location/pg-name | pg-id) delete-metric-destination md-id
|
|
|
|
|
|
Destroy a PostgreSQL database
|
|
|
|
Usage:
|
|
ubi pg (location/pg-name | pg-id) destroy [options]
|
|
|
|
Options:
|
|
-f, --force do not require confirmation
|
|
|
|
|
|
Dump a single PostgreSQL database using `pg_dump`
|
|
|
|
Usage:
|
|
ubi pg (location/pg-name | pg-id) [options] pg_dump [pg_dump-options]
|
|
|
|
|
|
Dump a entire PostgreSQL database cluster using `pg_dumpall`
|
|
|
|
Usage:
|
|
ubi pg (location/pg-name | pg-id) [options] pg_dumpall [pg_dumpall-options]
|
|
|
|
|
|
Connect to a PostgreSQL database using `psql`
|
|
|
|
Usage:
|
|
ubi pg (location/pg-name | pg-id) [options] psql [psql-options]
|
|
|
|
|
|
Reset the superuser password for a PostgreSQL database
|
|
|
|
Usage:
|
|
ubi pg (location/pg-name | pg-id) reset-superuser-password new-password
|
|
|
|
|
|
Restart a PostgreSQL database cluster
|
|
|
|
Usage:
|
|
ubi pg (location/pg-name | pg-id) restart
|
|
|
|
|
|
Restore a PostgreSQL database backup to a new database
|
|
|
|
Usage:
|
|
ubi pg (location/pg-name | pg-id) restore new-db-name restore-time
|
|
|
|
|
|
Show details for a PostgreSQL database
|
|
|
|
Usage:
|
|
ubi pg (location/pg-name | pg-id) show [options]
|
|
|
|
Options:
|
|
-f, --fields=fields show specific fields (comma separated)
|
|
|
|
Allowed Option Values:
|
|
Fields: id name state location vm-size target-vm-size storage-size-gib
|
|
target-storage-size-gib version ha-type flavor connection-string
|
|
primary earliest-restore-time firewall-rules metric-destinations
|
|
ca-certificates
|
|
|
|
|
|
Manage private subnets
|
|
|
|
Usage:
|
|
ubi ps command [...]
|
|
ubi ps (location/ps-name | ps-id) post-command [...]
|
|
|
|
Commands:
|
|
list List private subnets
|
|
|
|
Post Commands:
|
|
connect Connect a private subnet to another private subnet
|
|
create Create a private subnet
|
|
destroy Destroy a private subnet
|
|
disconnect Disconnect a private subnet from another private subnet
|
|
show Show details for a private subnet
|
|
|
|
|
|
List private subnets
|
|
|
|
Usage:
|
|
ubi ps list [options]
|
|
|
|
Options:
|
|
-f, --fields=fields show specific fields (comma separated)
|
|
-l, --location=location only show private subnets in given location
|
|
-N, --no-headers do not show headers
|
|
|
|
Allowed Option Values:
|
|
Fields: location name id net4 net6
|
|
|
|
|
|
Connect a private subnet to another private subnet
|
|
|
|
Usage:
|
|
ubi ps (location/ps-name | ps-id) connect ps-id
|
|
|
|
|
|
Create a private subnet
|
|
|
|
Usage:
|
|
ubi ps location/ps-name create [options]
|
|
|
|
Options:
|
|
-f, --firewall-id=id add to given firewall
|
|
|
|
|
|
Destroy a private subnet
|
|
|
|
Usage:
|
|
ubi ps (location/ps-name | ps-id) destroy [options]
|
|
|
|
Options:
|
|
-f, --force do not require confirmation
|
|
|
|
|
|
Disconnect a private subnet from another private subnet
|
|
|
|
Usage:
|
|
ubi ps (location/ps-name | ps-id) disconnect ps-id
|
|
|
|
|
|
Show details for a private subnet
|
|
|
|
Usage:
|
|
ubi ps (location/ps-name | ps-id) show [options]
|
|
|
|
Options:
|
|
-f, --fields=fields show specific fields (comma separated)
|
|
-n, --nic-fields=fields show specific nic fields (comma separated)
|
|
-r, --rule-fields=fields show specific firewall rule fields (comma separated)
|
|
-w, --firewall-fields=fields show specific firewall fields (comma separated)
|
|
|
|
Allowed Option Values:
|
|
Fields: id name state location net4 net6 firewalls nics
|
|
Nic Fields: id name private-ipv4 private-ipv6 vm-name
|
|
Firewall Rule Fields: id cidr port-range
|
|
Firewall Fields: id name description location path firewall-rules
|
|
|
|
|
|
Display CLI program version
|
|
|
|
Usage:
|
|
ubi version
|
|
|
|
|
|
Manage virtual machines
|
|
|
|
Usage:
|
|
ubi vm command [...]
|
|
ubi vm (location/vm-name | vm-id) [post-options] post-command [...]
|
|
|
|
Commands:
|
|
list List virtual machines
|
|
|
|
Post Commands:
|
|
create Create a virtual machine
|
|
destroy Destroy a virtual machine
|
|
restart Restart a virtual machine
|
|
scp Copy files to or from virtual machine using `scp`
|
|
sftp Copy files to or from virtual machine using `sftp`
|
|
show Show details for a virtual machine
|
|
ssh Connect to a virtual machine using `ssh`
|
|
|
|
Post Options:
|
|
-4, --ip4 use IPv4 address
|
|
-6, --ip6 use IPv6 address
|
|
-u, --user user override username
|
|
|
|
|
|
List virtual machines
|
|
|
|
Usage:
|
|
ubi vm list [options]
|
|
|
|
Options:
|
|
-f, --fields=fields show specific fields (comma separated)
|
|
-l, --location=location only show virtual machines in given location
|
|
-N, --no-headers do not show headers
|
|
|
|
Allowed Option Values:
|
|
Fields: location name id ip4 ip6
|
|
|
|
|
|
Create a virtual machine
|
|
|
|
Usage:
|
|
ubi vm location/vm-name create [options] public_key
|
|
|
|
Examples:
|
|
ubi vm eu-central-h1/my-vm-name create "$(cat ~/.ssh/id_ed25519.pub)"
|
|
ubi vm eu-central-h1/my-vm-name create "$(cat ~/.ssh/authorized_keys)"
|
|
|
|
Options:
|
|
-6, --ipv6-only do not enable IPv4
|
|
-b, --boot-image=image_name boot image
|
|
-p, --private-subnet-id=id place VM into specific private subnet
|
|
-s, --size=size server size
|
|
-S, --storage-size=size storage size
|
|
-u, --unix-user=username username (default: ubi)
|
|
|
|
Allowed Option Values:
|
|
Boot Image: ubuntu-noble ubuntu-jammy debian-12 almalinux-9
|
|
Size: standard-2 standard-4 standard-8 standard-16 standard-30 standard-60
|
|
burstable-1 burstable-2
|
|
Storage Size: 10 20 40 80 160 320 600 640 1200 2400
|
|
|
|
|
|
Destroy a virtual machine
|
|
|
|
Usage:
|
|
ubi vm (location/vm-name | vm-id) destroy [options]
|
|
|
|
Options:
|
|
-f, --force do not require confirmation
|
|
|
|
|
|
Restart a virtual machine
|
|
|
|
Usage:
|
|
ubi vm (location/vm-name | vm-id) restart
|
|
|
|
|
|
Copy files to or from virtual machine using `scp`
|
|
|
|
Usage:
|
|
ubi vm (location/vm-name | vm-id) [options] scp [scp-options] (local-path :remote-path | :remote-path local-path)
|
|
|
|
|
|
Copy files to or from virtual machine using `sftp`
|
|
|
|
Usage:
|
|
ubi vm (location/vm-name | vm-id) [options] sftp [sftp-options]
|
|
|
|
|
|
Show details for a virtual machine
|
|
|
|
Usage:
|
|
ubi vm (location/vm-name | vm-id) show [options]
|
|
|
|
Options:
|
|
-f, --fields=fields show specific fields (comma separated)
|
|
-r, --rule-fields=fields show specific firewall rule fields (comma separated)
|
|
-w, --firewall-fields=fields show specific firewall fields (comma separated)
|
|
|
|
Allowed Option Values:
|
|
Fields: id name state location size unix-user storage-size-gib ip6
|
|
ip4-enabled ip4 private-ipv4 private-ipv6 subnet firewalls
|
|
Firewall Rule Fields: id cidr port-range
|
|
Firewall Fields: id name description location path firewall-rules
|
|
|
|
|
|
Connect to a virtual machine using `ssh`
|
|
|
|
Usage:
|
|
ubi vm (location/vm-name | vm-id) [options] ssh [ssh-options --] [remote-cmd [remote-cmd-arg ...]]
|
|
|
|
|