POST
/
project
/
{project_id}
/
location
/
{location}
/
vm
/
{vm_name}
curl --request POST \
  --url https://api.ubicloud.com/project/{project_id}/location/{location}/vm/{vm_name} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "boot_image": "<string>",
  "enable_ip4": true,
  "private_subnet_id": "<string>",
  "public_key": "<string>",
  "size": "<string>",
  "storage_size": 123,
  "unix_user": "<string>"
}'
{
  "id": "vmhfy8gff8c67hasb0eez2k1pd",
  "ip4": "127.0.0.1",
  "ip4_enabled": true,
  "ip6": "2606:4700:3108::ac42:2835",
  "location": "eu-central-h1",
  "name": "my-vm-name",
  "size": "<string>",
  "state": "<string>",
  "storage_size_gib": 123,
  "unix_user": "<string>",
  "firewalls": [
    {
      "description": "<string>",
      "firewall_rules": [
        {
          "cidr": "<string>",
          "id": "fraz0q3vbrpa7pkg7zbmah9csn",
          "port_range": "<string>"
        }
      ],
      "id": "fwfg7td83em22qfw9pq5xyfqb7",
      "location": "<string>",
      "name": "<string>"
    }
  ],
  "private_ipv4": "127.0.0.1",
  "private_ipv6": "2606:4700:3108::ac42:2835",
  "subnet": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

project_id
string
required

ID of the project

Example:

"pjkkmx0f2vke4h36nk9cm8v8q0"

location
string
required

The Ubicloud location/region

Example:

"eu-central-h1"

vm_name
string
required

Virtual machine name

Body

application/json
public_key
string
required

Public SSH key for the VM

boot_image
string

Boot image of the VM

enable_ip4
boolean

Enable IPv4

private_subnet_id
string

ID of the private subnet

size
string

Size of the VM

storage_size
integer

Requested storage size in GiB

unix_user
string

Unix user of the VM

Response

200
application/json
A VM
id
string
required

ID of the VM

Example:

"vmhfy8gff8c67hasb0eez2k1pd"

ip4
string | null
required

IPv4 address

ip4_enabled
boolean
required

Whether IPv4 is enabled

ip6
string | null
required

IPv6 address

location
string
required

Location of the VM

Example:

"eu-central-h1"

name
string
required

Name of the VM

Example:

"my-vm-name"

size
string
required

Size of the underlying VM

state
string
required

State of the VM

storage_size_gib
integer
required

Storage size in GiB

unix_user
string
required

Unix user of the VM

firewalls
object[]
required

List of firewalls

private_ipv4
string
required

Private IPv4 address

private_ipv6
string
required

Private IPv6 address

subnet
string
required

Subnet of the VM