Skip to content
Docs

Compute

ComputeVMs

Create VM
client.compute.vms.create(VMCreateParams { boot_volume, instance_type, name, 8 more } body, RequestOptionsoptions?): Operation { id, created_at, details, 6 more }
POST/v1/compute/vms
Get VM Details
client.compute.vms.get(stringvmID, RequestOptionsoptions?): VM { id, boot_volume_id, cpu_config, 16 more }
GET/v1/compute/vms/{vm_id}
Update VM
client.compute.vms.update(stringvmID, VMUpdateParams { instance_type, name, public_ip_enabled, tags } body, RequestOptionsoptions?): Operation { id, created_at, details, 6 more }
PATCH/v1/compute/vms/{vm_id}
Delete VM
client.compute.vms.delete(stringvmID, RequestOptionsoptions?): Operation { id, created_at, details, 6 more }
DELETE/v1/compute/vms/{vm_id}
List VMs
client.compute.vms.list(VMListParams { project_id, cursor, limit } query, RequestOptionsoptions?): Cursor<VM { id, boot_volume_id, cpu_config, 16 more } >
GET/v1/compute/vms
Restart VM
client.compute.vms.restart(stringvmID, RequestOptionsoptions?): Operation { id, created_at, details, 6 more }
POST/v1/compute/vms/{vm_id}/restart
ModelsExpand Collapse
CPUConfig { vcpu }

CPU configuration for the VM.

vcpu: number

Number of virtual CPUs.

maximum192
minimum1
MemoryConfig { size }

Memory configuration for the VM.

size: number

Size of the memory in GB.

maximum768
minimum1
OSImage { created_at, display_name, name }

OS Image details.

created_at: string

When the OS Image was created.

formatdate-time
display_name: string

Display name of the OS Image.

name: string

Name of the OS Image.

SSHKeyRequest { public_key }

Public SSH key configuration for the VM.

public_key: string

Public key to and use to access the VM.

VM { id, boot_volume_id, cpu_config, 16 more }

VM details.

id: string

Unique identifier for the VM.

boot_volume_id: string

ID of the boot volume attached to the VM.

cpu_config: CPUConfig { vcpu }

CPU configuration for the VM.

vcpu: number

Number of virtual CPUs.

maximum192
minimum1
created_at: string

When the VM was created.

formatdate-time
data_volume_ids: Array<string>

IDs of the data volumes attached to the VM.

memory_config: MemoryConfig { size }

Memory configuration for the VM.

size: number

Size of the memory in GB.

maximum768
minimum1
name: string

Name of the VM.

private_ip: string | null

Private IP of the VM.

project_id: string

Project ID the VM belongs to.

public_ip: string | null

Public IP of the VM.

public_ip_enabled: boolean

Whether the public IP is enabled for the VM.

region: RegionName { }

Region the resource is in.

Status of the resource.

One of the following:
"pending"
"creating"
"updating"
"ready"
"deleting"
"deleted"
"error"
subnet_id: string

ID of the subnet the VM is in.

tags: Array<string>

Tags to attach to the VM.

updated_at: string

When the VM was updated.

formatdate-time
vpc_id: string

ID of the VPC the VM is in.

vpc_name: string

Name of the VPC the VM is in.

instance_type?: string | null

Instance type name.

VMList { items, pagination }
items: Array<VM { id, boot_volume_id, cpu_config, 16 more } >
id: string

Unique identifier for the VM.

boot_volume_id: string

ID of the boot volume attached to the VM.

cpu_config: CPUConfig { vcpu }

CPU configuration for the VM.

vcpu: number

Number of virtual CPUs.

maximum192
minimum1
created_at: string

When the VM was created.

formatdate-time
data_volume_ids: Array<string>

IDs of the data volumes attached to the VM.

memory_config: MemoryConfig { size }

Memory configuration for the VM.

size: number

Size of the memory in GB.

maximum768
minimum1
name: string

Name of the VM.

private_ip: string | null

Private IP of the VM.

project_id: string

Project ID the VM belongs to.

public_ip: string | null

Public IP of the VM.

public_ip_enabled: boolean

Whether the public IP is enabled for the VM.

region: RegionName { }

Region the resource is in.

Status of the resource.

One of the following:
"pending"
"creating"
"updating"
"ready"
"deleting"
"deleted"
"error"
subnet_id: string

ID of the subnet the VM is in.

tags: Array<string>

Tags to attach to the VM.

updated_at: string

When the VM was updated.

formatdate-time
vpc_id: string

ID of the VPC the VM is in.

vpc_name: string

Name of the VPC the VM is in.

instance_type?: string | null

Instance type name.

ComputeVMsAvailability

Check VM Create Availability
client.compute.vms.availability.create(AvailabilityCreateParams { boot_volume, instance_type, name, 8 more } body, RequestOptionsoptions?): void
POST/v1/compute/vms/availability
Check VM Update Availability
client.compute.vms.availability.update(stringvmID, AvailabilityUpdateParams { instance_type, name, public_ip_enabled, tags } body, RequestOptionsoptions?): void
PATCH/v1/compute/vms/{vm_id}/availability

ComputeVMsVolumes

List VM's Volumes
client.compute.vms.volumes.list(stringvmID, VolumeListParams { cursor, limit } query?, RequestOptionsoptions?): Cursor<Volume { id, created_at, kind, 10 more } >
GET/v1/compute/vms/{vm_id}/volumes

ComputeVMsOS Images

List OS Images
client.compute.vms.osImages.list(OSImageListParams { cursor, limit } query?, RequestOptionsoptions?): Cursor<OSImage { created_at, display_name, name } >
GET/v1/compute/vms/os_images

ComputeVolumes

Create Volume
client.compute.volumes.create(VolumeCreateParams { name, project_id, region, 4 more } body, RequestOptionsoptions?): Operation { id, created_at, details, 6 more }
POST/v1/compute/volumes
Get Volume
client.compute.volumes.get(stringvolumeID, RequestOptionsoptions?): Volume { id, created_at, kind, 10 more }
GET/v1/compute/volumes/{volume_id}
Update Volume
client.compute.volumes.update(stringvolumeID, VolumeUpdateParams { name, size, tags } body, RequestOptionsoptions?): Operation { id, created_at, details, 6 more }
PATCH/v1/compute/volumes/{volume_id}
Delete Volume
client.compute.volumes.delete(stringvolumeID, RequestOptionsoptions?): Operation { id, created_at, details, 6 more }
DELETE/v1/compute/volumes/{volume_id}
List Volumes
client.compute.volumes.list(VolumeListParams { project_id, cursor, limit } query, RequestOptionsoptions?): Cursor<Volume { id, created_at, kind, 10 more } >
GET/v1/compute/volumes
Attach Volume
client.compute.volumes.attach(stringvolumeID, VolumeAttachParams { vm_id } body, RequestOptionsoptions?): Operation { id, created_at, details, 6 more }
POST/v1/compute/volumes/{volume_id}/attach
Detach Volume
client.compute.volumes.detach(stringvolumeID, RequestOptionsoptions?): Operation { id, created_at, details, 6 more }
POST/v1/compute/volumes/{volume_id}/detach
ModelsExpand Collapse
Volume { id, created_at, kind, 10 more }

Volume details.

id: string

Unique identifier for the Volume.

created_at: string

When the Volume was created.

formatdate-time

Volume kind.

One of the following:
"boot"
"data"
name: string

Name of the Volume.

project_id: string

Project ID the Volume belongs to.

region: RegionName { }

Region the resource is in.

size: number

Size of the Volume in GB.

Status of the resource.

One of the following:
"pending"
"creating"
"updating"
"ready"
"deleting"
"deleted"
"error"
tags: Array<string>

Tags to attach to the Volume.

Type of the Volume.

One of the following:
"nvme"
"abs"
updated_at: string

When the Volume was updated.

formatdate-time
vm_id: string | null

ID of the VM the Volume is attached to.

vm_name: string | null

Name of the VM the Volume is attached to.

VolumeKind = "boot" | "data"

Volume kind.

One of the following:
"boot"
"data"
VolumeList { items, pagination }
items: Array<Volume { id, created_at, kind, 10 more } >
id: string

Unique identifier for the Volume.

created_at: string

When the Volume was created.

formatdate-time

Volume kind.

One of the following:
"boot"
"data"
name: string

Name of the Volume.

project_id: string

Project ID the Volume belongs to.

region: RegionName { }

Region the resource is in.

size: number

Size of the Volume in GB.

Status of the resource.

One of the following:
"pending"
"creating"
"updating"
"ready"
"deleting"
"deleted"
"error"
tags: Array<string>

Tags to attach to the Volume.

Type of the Volume.

One of the following:
"nvme"
"abs"
updated_at: string

When the Volume was updated.

formatdate-time
vm_id: string | null

ID of the VM the Volume is attached to.

vm_name: string | null

Name of the VM the Volume is attached to.

VolumeType = "nvme" | "abs"

Type of the Volume.

One of the following:
"nvme"
"abs"

ComputeVolumesAvailability

Check Volume Create Availability
client.compute.volumes.availability.create(AvailabilityCreateParams { name, project_id, region, 4 more } body, RequestOptionsoptions?): void
POST/v1/compute/volumes/availability
Check Volume Update Availability
client.compute.volumes.availability.update(stringvolumeID, AvailabilityUpdateParams { name, size, tags } body, RequestOptionsoptions?): void
PATCH/v1/compute/volumes/{volume_id}/availability