instance_create

Create instance
post/v1/instances

Query Parameters

project

Request Body

Create-time parameters for an Instance

Object
auto_restart_policy

The auto-restart policy for this instance.

This indicates whether the instance should be automatically restarted by the control plane on failure. If this is null, no auto-restart policy has been configured for this instance by the user.

A policy determining when an instance should be automatically restarted by the control plane.

boot_disk

The disk this instance should boot into. This disk can either be attached if it already exists, or created, if it should be a new disk.

It is strongly recommended to either provide a boot disk at instance creation, or update the instance after creation to set a boot disk.

An instance without an explicit boot disk can be booted: the options are as managed by UEFI, and as controlled by the guest OS, but with some risk. If this instance later has a disk attached or detached, it is possible that boot options can end up reordered, with the intended boot disk moved after the EFI shell in boot priority. This may result in an instance that only boots to the EFI shell until the desired disk is set as an explicit boot disk and the instance rebooted.

Describe the instance's disks at creation time

description
disks

The disks to be created or attached for this instance.

Describe the instance's disks at creation time

external_ips

The external IP addresses provided to this instance.

By default, all instances have outbound connectivity, but no inbound connectivity. These external addresses can be used to provide a fixed, known IP address for making inbound connections to the instance.

Parameters for creating an external IP address for instances.

hostname

The hostname to be assigned to the instance

A hostname identifies a host on a network, and is usually a dot-delimited sequence of labels, where each label contains only letters, digits, or the hyphen. See RFCs 1035 and 952 for more details.

memory

The amount of RAM (in bytes) to be allocated to the instance

Byte count to express memory or storage capacity.

name

Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'. Names cannot be a UUID, but they may contain a UUID. They can be at most 63 characters long.

ncpus

The number of vCPUs to be allocated to the instance

The number of CPUs in an Instance

network_interfaces

The network interfaces to be created for this instance.

Describes an attachment of an InstanceNetworkInterface to an Instance, at the time the instance is created.

ssh_public_keys

An allowlist of SSH public keys to be transferred to the instance via cloud-init during instance creation.

If not provided, all SSH public keys from the user's profile will be sent. If an empty list is provided, no public keys will be transmitted to the instance.

start

Should this instance be started upon creation; true by default.

user_data

User data for instance initialization systems (such as cloud-init). Must be a Base64-encoded string, as specified in RFC 4648 ยง 4 (+ and / characters with padding). Maximum 32 KiB unencoded data.

Responses

Object
auto_restart_cooldown_expiration

The time at which the auto-restart cooldown period for this instance completes, permitting it to be automatically restarted again. If the instance enters the Failed state, it will not be restarted until after this time.

If this is not present, then either the instance has never been automatically restarted, or the cooldown period has already expired, allowing the instance to be restarted immediately if it fails.

auto_restart_enabled

true if this instance's auto-restart policy will permit the control plane to automatically restart it if it enters the Failed state.

auto_restart_policy

The auto-restart policy configured for this instance, or None if no explicit policy is configured.

If this is not present, then this instance uses the default auto-restart policy, which may or may not allow it to be restarted. The auto_restart_enabled field indicates whether the instance will be automatically restarted.

A policy determining when an instance should be automatically restarted by the control plane.

boot_disk_id

the ID of the disk used to boot this Instance, if a specific one is assigned.

description

human-readable free-form text about a resource

hostname

RFC1035-compliant hostname for the Instance.

id

unique, immutable, system-controlled identifier for each resource

memory

memory allocated for this Instance

Byte count to express memory or storage capacity.

name

unique, mutable, user-controlled identifier for each resource

Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'. Names cannot be a UUID, but they may contain a UUID. They can be at most 63 characters long.

ncpus

number of CPUs allocated for this Instance

The number of CPUs in an Instance

project_id

id for the project containing this Instance

run_state

Running state of an Instance (primarily: booted or stopped)

This typically reflects whether it's starting, running, stopping, or stopped, but also includes states related to the Instance's lifecycle

time_created

timestamp when this resource was created

time_last_auto_restarted

The timestamp of the most recent time this instance was automatically restarted by the control plane.

If this is not present, then this instance has not been automatically restarted.

time_modified

timestamp when this resource was last modified

time_run_state_updated