Skip to content

Create a New Droplet

client.GPUDroplets.New(ctx, body) (*GPUDropletNewResponse, error)
post/v2/droplets

To create a new Droplet, send a POST request to /v2/droplets setting the required attributes.

A Droplet will be created using the provided information. The response body will contain a JSON object with a key called droplet. The value will be an object containing the standard attributes for your new Droplet. The response code, 202 Accepted, does not indicate the success or failure of the operation, just that the request has been accepted for processing. The actions returned as part of the response's links object can be used to check the status of the Droplet create event.

Create Multiple Droplets

Creating multiple Droplets is very similar to creating a single Droplet. Instead of sending name as a string, send names as an array of strings. A Droplet will be created for each name you send using the associated information. Up to ten Droplets may be created this way at a time.

Rather than returning a single Droplet, the response body will contain a JSON array with a key called droplets. This will be set to an array of JSON objects, each of which will contain the standard Droplet attributes. The response code, 202 Accepted, does not indicate the success or failure of any operation, just that the request has been accepted for processing. The array of actions returned as part of the response's links object can be used to check the status of each individual Droplet create event.

ParametersExpand Collapse
body GPUDropletNewParams

The image ID of a public or private image or the slug identifier for a public image. This image will be the base image for your Droplet.
Requires image:read scope.

UnionString
UnionInt
Name param.Field[string]

The human-readable string you wish to use when displaying the Droplet name. The name, if set to a domain name managed in the DigitalOcean DNS management system, will configure a PTR record for the Droplet. The name set during creation will also determine the hostname for the Droplet in its internal configuration.

maxLength255
Size param.Field[string]

The slug identifier for the size that you wish to select for this Droplet.

BackupPolicy param.Field[DropletBackupPolicy]optional

An object specifying the backup policy for the Droplet. If omitted and backups is true, the backup plan will default to daily.

Backups param.Field[bool]optional

A boolean indicating whether automated backups should be enabled for the Droplet.

Ipv6 param.Field[bool]optional

A boolean indicating whether to enable IPv6 on the Droplet.

Monitoring param.Field[bool]optional

A boolean indicating whether to install the DigitalOcean agent for monitoring.

DeprecatedPrivateNetworking param.Field[bool]optional

This parameter has been deprecated. Use vpc_uuid instead to specify a VPC network for the Droplet. If no vpc_uuid is provided, the Droplet will be placed in your account's default VPC for the region.

Region param.Field[string]optional

The slug identifier for the region that you wish to deploy the Droplet in. If the specific datacenter is not not important, a slug prefix (e.g. nyc) can be used to deploy the Droplet in any of the that region's locations (nyc1, nyc2, or nyc3). If the region is omitted from the create request completely, the Droplet may deploy in any region.

SSHKeys param.Field[[]GPUDropletNewParamsDropletSingleCreateSSHKeyUnion]optional

An array containing the IDs or fingerprints of the SSH keys that you wish to embed in the Droplet's root account upon creation. You must add the keys to your team before they can be embedded on a Droplet.
Requires ssh_key:read scope.

UnionString
UnionInt
Tags param.Field[[]string]optional

A flat array of tag names as strings to apply to the Droplet after it is created. Tag names can either be existing or new tags.
Requires tag:create scope.

UserData param.Field[string]optional

A string containing 'user data' which may be used to configure the Droplet on first boot, often a 'cloud-config' file or Bash script. It must be plain text and may not exceed 64 KiB in size.

Volumes param.Field[[]string]optional

An array of IDs for block storage volumes that will be attached to the Droplet once created. The volumes must not already be attached to an existing Droplet.
Requires block_storage:read scpoe.

VpcUuid param.Field[string]optional

A string specifying the UUID of the VPC to which the Droplet will be assigned. If excluded, the Droplet will be assigned to your account's default VPC for the region.
Requires vpc:read scope.

WithDropletAgent param.Field[bool]optional

A boolean indicating whether to install the DigitalOcean agent used for providing access to the Droplet web console in the control panel. By default, the agent is installed on new Droplets but installation errors (i.e. OS not supported) are ignored. To prevent it from being installed, set to false. To make installation errors fatal, explicitly set it to true.

ReturnsExpand Collapse
type GPUDropletNewResponse interface{…}
Accepts one of the following:
type GPUDropletNewResponseSingleDropletResponse struct{…}
Droplet Droplet
ID int64

A unique identifier for each Droplet instance. This is automatically generated upon Droplet creation.

BackupIDs []int64

An array of backup IDs of any backups that have been taken of the Droplet instance. Droplet backups are enabled at the time of the instance creation.
Requires image:read scope.

CreatedAt Time

A time value given in ISO8601 combined date and time format that represents when the Droplet was created.

formatdate-time
Disk int64

The size of the Droplet's disk in gigabytes.

Features []string

An array of features enabled on this Droplet.

Image Image

The Droplet's image.
Requires image:read scope.

ID int64optional

A unique number that can be used to identify and reference a specific image.

CreatedAt Timeoptional

A time value given in ISO8601 combined date and time format that represents when the image was created.

formatdate-time
Description stringoptional

An optional free-form text field to describe an image.

Distribution ImageDistributionoptional

The name of a custom image's distribution. Currently, the valid values are Arch Linux, CentOS, CoreOS, Debian, Fedora, Fedora Atomic, FreeBSD, Gentoo, openSUSE, RancherOS, Rocky Linux, Ubuntu, and Unknown. Any other value will be accepted but ignored, and Unknown will be used in its place.

Accepts one of the following:
const ImageDistributionArchLinux ImageDistribution = "Arch Linux"
const ImageDistributionCentOs ImageDistribution = "CentOS"
const ImageDistributionCoreOs ImageDistribution = "CoreOS"
const ImageDistributionDebian ImageDistribution = "Debian"
const ImageDistributionFedora ImageDistribution = "Fedora"
const ImageDistributionFedoraAtomic ImageDistribution = "Fedora Atomic"
const ImageDistributionFreeBsd ImageDistribution = "FreeBSD"
const ImageDistributionGentoo ImageDistribution = "Gentoo"
const ImageDistributionOpenSuse ImageDistribution = "openSUSE"
const ImageDistributionRancherOs ImageDistribution = "RancherOS"
const ImageDistributionRockyLinux ImageDistribution = "Rocky Linux"
const ImageDistributionUbuntu ImageDistribution = "Ubuntu"
const ImageDistributionUnknown ImageDistribution = "Unknown"
ErrorMessage stringoptional

A string containing information about errors that may occur when importing a custom image.

MinDiskSize int64optional

The minimum disk size in GB required for a Droplet to use this image.

minimum0
Name stringoptional

The display name that has been given to an image. This is what is shown in the control panel and is generally a descriptive title for the image in question.

Public booloptional

This is a boolean value that indicates whether the image in question is public or not. An image that is public is available to all accounts. A non-public image is only accessible from your account.

Regions []ImageRegionoptional

This attribute is an array of the regions that the image is available in. The regions are represented by their identifying slug values.

Accepts one of the following:
const ImageRegionAms1 ImageRegion = "ams1"
const ImageRegionAms2 ImageRegion = "ams2"
const ImageRegionAms3 ImageRegion = "ams3"
const ImageRegionBlr1 ImageRegion = "blr1"
const ImageRegionFra1 ImageRegion = "fra1"
const ImageRegionLon1 ImageRegion = "lon1"
const ImageRegionNyc1 ImageRegion = "nyc1"
const ImageRegionNyc2 ImageRegion = "nyc2"
const ImageRegionNyc3 ImageRegion = "nyc3"
const ImageRegionSfo1 ImageRegion = "sfo1"
const ImageRegionSfo2 ImageRegion = "sfo2"
const ImageRegionSfo3 ImageRegion = "sfo3"
const ImageRegionSgp1 ImageRegion = "sgp1"
const ImageRegionTor1 ImageRegion = "tor1"
const ImageRegionSyd1 ImageRegion = "syd1"
SizeGigabytes float64optional

The size of the image in gigabytes.

formatfloat
Slug stringoptional

A uniquely identifying string that is associated with each of the DigitalOcean-provided public images. These can be used to reference a public image as an alternative to the numeric id.

Status ImageStatusoptional

A status string indicating the state of a custom image. This may be NEW, available, pending, deleted, or retired.

Accepts one of the following:
const ImageStatusNew ImageStatus = "NEW"
const ImageStatusAvailable ImageStatus = "available"
const ImageStatusPending ImageStatus = "pending"
const ImageStatusDeleted ImageStatus = "deleted"
const ImageStatusRetired ImageStatus = "retired"
Tags []stringoptional

A flat array of tag names as strings to be applied to the resource. Tag names may be for either existing or new tags.

Requires tag:create scope.

Type ImageTypeoptional

Describes the kind of image. It may be one of base, snapshot, backup, custom, or admin. Respectively, this specifies whether an image is a DigitalOcean base OS image, user-generated Droplet snapshot, automatically created Droplet backup, user-provided virtual machine image, or an image used for DigitalOcean managed resources (e.g. DOKS worker nodes).

Accepts one of the following:
const ImageTypeBase ImageType = "base"
const ImageTypeSnapshot ImageType = "snapshot"
const ImageTypeBackup ImageType = "backup"
const ImageTypeCustom ImageType = "custom"
const ImageTypeAdmin ImageType = "admin"
Locked bool

A boolean value indicating whether the Droplet has been locked, preventing actions by users.

Memory int64

Memory of the Droplet in megabytes.

multipleOf8
Name string

The human-readable name set for the Droplet instance.

Networks DropletNetworks

The details of the network that are configured for the Droplet instance. This is an object that contains keys for IPv4 and IPv6. The value of each of these is an array that contains objects describing an individual IP resource allocated to the Droplet. These will define attributes like the IP address, netmask, and gateway of the specific network depending on the type of network it is.

V4 []NetworkV4optional
Gateway stringoptional

The gateway of the specified IPv4 network interface.

For private interfaces, a gateway is not provided. This is denoted by returning nil as its value.

IPAddress stringoptional

The IP address of the IPv4 network interface.

formatipv4
Netmask stringoptional

The netmask of the IPv4 network interface.

formatipv4
Type NetworkV4Typeoptional

The type of the IPv4 network interface.

Accepts one of the following:
const NetworkV4TypePublic NetworkV4Type = "public"
const NetworkV4TypePrivate NetworkV4Type = "private"
V6 []NetworkV6optional
Gateway stringoptional

The gateway of the specified IPv6 network interface.

formatipv6
IPAddress stringoptional

The IP address of the IPv6 network interface.

formatipv6
Netmask int64optional

The netmask of the IPv6 network interface.

Type NetworkV6Typeoptional

The type of the IPv6 network interface.

Note: IPv6 private networking is not currently supported.

Accepts one of the following:
const NetworkV6TypePublic NetworkV6Type = "public"
NextBackupWindow DropletNextBackupWindow

The details of the Droplet's backups feature, if backups are configured for the Droplet. This object contains keys for the start and end times of the window during which the backup will start.

End Timeoptional

A time value given in ISO8601 combined date and time format specifying the end of the Droplet's backup window.

formatdate-time
Start Timeoptional

A time value given in ISO8601 combined date and time format specifying the start of the Droplet's backup window.

formatdate-time
Region Region
Available bool

This is a boolean value that represents whether new Droplets can be created in this region.

Features []string

This attribute is set to an array which contains features available in this region

Name string

The display name of the region. This will be a full name that is used in the control panel and other interfaces.

Sizes []string

This attribute is set to an array which contains the identifying slugs for the sizes available in this region. sizes:read is required to view.

Slug string

A human-readable string that is used as a unique identifier for each region.

Size Size
Available bool

This is a boolean value that represents whether new Droplets can be created with this size.

Description string

A string describing the class of Droplets created from this size. For example: Basic, General Purpose, CPU-Optimized, Memory-Optimized, or Storage-Optimized.

Disk int64

The amount of disk space set aside for Droplets of this size. The value is represented in gigabytes.

Memory int64

The amount of RAM allocated to Droplets created of this size. The value is represented in megabytes.

multipleOf8
minimum8
PriceHourly float64

This describes the price of the Droplet size as measured hourly. The value is measured in US dollars.

formatfloat
PriceMonthly float64

This attribute describes the monthly cost of this Droplet size if the Droplet is kept for an entire month. The value is measured in US dollars.

formatfloat
Regions []string

An array containing the region slugs where this size is available for Droplet creates.

Slug string

A human-readable string that is used to uniquely identify each size.

Transfer float64

The amount of transfer bandwidth that is available for Droplets created in this size. This only counts traffic on the public interface. The value is given in terabytes.

formatfloat
Vcpus int64

The number of CPUs allocated to Droplets of this size.

DiskInfo []DiskInfooptional

An array of objects containing information about the disks available to Droplets created with this size.

Size DiskInfoSizeoptional
Amount int64optional

The amount of space allocated to the disk.

Unit stringoptional

The unit of measure for the disk size.

Type DiskInfoTypeoptional

The type of disk. All Droplets contain a local disk. Additionally, GPU Droplets can also have a scratch disk for non-persistent data.

Accepts one of the following:
const DiskInfoTypeLocal DiskInfoType = "local"
const DiskInfoTypeScratch DiskInfoType = "scratch"
GPUInfo GPUInfooptional

An object containing information about the GPU capabilities of Droplets created with this size.

Count int64optional

The number of GPUs allocated to the Droplet.

Model stringoptional

The model of the GPU.

Vram GPUInfoVramoptional
Amount int64optional

The amount of VRAM allocated to the GPU.

Unit stringoptional

The unit of measure for the VRAM.

SizeSlug string

The unique slug identifier for the size of this Droplet.

SnapshotIDs []int64

An array of snapshot IDs of any snapshots created from the Droplet instance.
Requires image:read scope.

Status DropletStatus

A status string indicating the state of the Droplet instance. This may be "new", "active", "off", or "archive".

Accepts one of the following:
const DropletStatusNew DropletStatus = "new"
const DropletStatusActive DropletStatus = "active"
const DropletStatusOff DropletStatus = "off"
const DropletStatusArchive DropletStatus = "archive"
Tags []string

An array of Tags the Droplet has been tagged with.
Requires tag:read scope.

Vcpus int64

The number of virtual CPUs.

VolumeIDs []string

A flat array including the unique identifier for each Block Storage volume attached to the Droplet.
Requires block_storage:read scope.

DiskInfo []DiskInfooptional

An array of objects containing information about the disks available to the Droplet.

Size DiskInfoSizeoptional
Amount int64optional

The amount of space allocated to the disk.

Unit stringoptional

The unit of measure for the disk size.

Type DiskInfoTypeoptional

The type of disk. All Droplets contain a local disk. Additionally, GPU Droplets can also have a scratch disk for non-persistent data.

Accepts one of the following:
const DiskInfoTypeLocal DiskInfoType = "local"
const DiskInfoTypeScratch DiskInfoType = "scratch"
GPUInfo GPUInfooptional

An object containing information about the GPU capabilities of Droplets created with this size.

Count int64optional

The number of GPUs allocated to the Droplet.

Model stringoptional

The model of the GPU.

Vram GPUInfoVramoptional
Amount int64optional

The amount of VRAM allocated to the GPU.

Unit stringoptional

The unit of measure for the VRAM.

DeprecatedKernel Kerneloptional

Note: All Droplets created after March 2017 use internal kernels by default. These Droplets will have this attribute set to null.

The current kernel for Droplets with externally managed kernels. This will initially be set to the kernel of the base image when the Droplet is created.

ID int64optional

A unique number used to identify and reference a specific kernel.

Name stringoptional

The display name of the kernel. This is shown in the web UI and is generally a descriptive title for the kernel in question.

Version stringoptional

A standard kernel version string representing the version, patch, and release information.

VpcUuid stringoptional

A string specifying the UUID of the VPC to which the Droplet is assigned.
Requires vpc:read scope.

type GPUDropletNewResponseMultipleDropletResponse struct{…}
Droplets []Droplet
ID int64

A unique identifier for each Droplet instance. This is automatically generated upon Droplet creation.

BackupIDs []int64

An array of backup IDs of any backups that have been taken of the Droplet instance. Droplet backups are enabled at the time of the instance creation.
Requires image:read scope.

CreatedAt Time

A time value given in ISO8601 combined date and time format that represents when the Droplet was created.

formatdate-time
Disk int64

The size of the Droplet's disk in gigabytes.

Features []string

An array of features enabled on this Droplet.

Image Image

The Droplet's image.
Requires image:read scope.

ID int64optional

A unique number that can be used to identify and reference a specific image.

CreatedAt Timeoptional

A time value given in ISO8601 combined date and time format that represents when the image was created.

formatdate-time
Description stringoptional

An optional free-form text field to describe an image.

Distribution ImageDistributionoptional

The name of a custom image's distribution. Currently, the valid values are Arch Linux, CentOS, CoreOS, Debian, Fedora, Fedora Atomic, FreeBSD, Gentoo, openSUSE, RancherOS, Rocky Linux, Ubuntu, and Unknown. Any other value will be accepted but ignored, and Unknown will be used in its place.

Accepts one of the following:
const ImageDistributionArchLinux ImageDistribution = "Arch Linux"
const ImageDistributionCentOs ImageDistribution = "CentOS"
const ImageDistributionCoreOs ImageDistribution = "CoreOS"
const ImageDistributionDebian ImageDistribution = "Debian"
const ImageDistributionFedora ImageDistribution = "Fedora"
const ImageDistributionFedoraAtomic ImageDistribution = "Fedora Atomic"
const ImageDistributionFreeBsd ImageDistribution = "FreeBSD"
const ImageDistributionGentoo ImageDistribution = "Gentoo"
const ImageDistributionOpenSuse ImageDistribution = "openSUSE"
const ImageDistributionRancherOs ImageDistribution = "RancherOS"
const ImageDistributionRockyLinux ImageDistribution = "Rocky Linux"
const ImageDistributionUbuntu ImageDistribution = "Ubuntu"
const ImageDistributionUnknown ImageDistribution = "Unknown"
ErrorMessage stringoptional

A string containing information about errors that may occur when importing a custom image.

MinDiskSize int64optional

The minimum disk size in GB required for a Droplet to use this image.

minimum0
Name stringoptional

The display name that has been given to an image. This is what is shown in the control panel and is generally a descriptive title for the image in question.

Public booloptional

This is a boolean value that indicates whether the image in question is public or not. An image that is public is available to all accounts. A non-public image is only accessible from your account.

Regions []ImageRegionoptional

This attribute is an array of the regions that the image is available in. The regions are represented by their identifying slug values.

Accepts one of the following:
const ImageRegionAms1 ImageRegion = "ams1"
const ImageRegionAms2 ImageRegion = "ams2"
const ImageRegionAms3 ImageRegion = "ams3"
const ImageRegionBlr1 ImageRegion = "blr1"
const ImageRegionFra1 ImageRegion = "fra1"
const ImageRegionLon1 ImageRegion = "lon1"
const ImageRegionNyc1 ImageRegion = "nyc1"
const ImageRegionNyc2 ImageRegion = "nyc2"
const ImageRegionNyc3 ImageRegion = "nyc3"
const ImageRegionSfo1 ImageRegion = "sfo1"
const ImageRegionSfo2 ImageRegion = "sfo2"
const ImageRegionSfo3 ImageRegion = "sfo3"
const ImageRegionSgp1 ImageRegion = "sgp1"
const ImageRegionTor1 ImageRegion = "tor1"
const ImageRegionSyd1 ImageRegion = "syd1"
SizeGigabytes float64optional

The size of the image in gigabytes.

formatfloat
Slug stringoptional

A uniquely identifying string that is associated with each of the DigitalOcean-provided public images. These can be used to reference a public image as an alternative to the numeric id.

Status ImageStatusoptional

A status string indicating the state of a custom image. This may be NEW, available, pending, deleted, or retired.

Accepts one of the following:
const ImageStatusNew ImageStatus = "NEW"
const ImageStatusAvailable ImageStatus = "available"
const ImageStatusPending ImageStatus = "pending"
const ImageStatusDeleted ImageStatus = "deleted"
const ImageStatusRetired ImageStatus = "retired"
Tags []stringoptional

A flat array of tag names as strings to be applied to the resource. Tag names may be for either existing or new tags.

Requires tag:create scope.

Type ImageTypeoptional

Describes the kind of image. It may be one of base, snapshot, backup, custom, or admin. Respectively, this specifies whether an image is a DigitalOcean base OS image, user-generated Droplet snapshot, automatically created Droplet backup, user-provided virtual machine image, or an image used for DigitalOcean managed resources (e.g. DOKS worker nodes).

Accepts one of the following:
const ImageTypeBase ImageType = "base"
const ImageTypeSnapshot ImageType = "snapshot"
const ImageTypeBackup ImageType = "backup"
const ImageTypeCustom ImageType = "custom"
const ImageTypeAdmin ImageType = "admin"
Locked bool

A boolean value indicating whether the Droplet has been locked, preventing actions by users.

Memory int64

Memory of the Droplet in megabytes.

multipleOf8
Name string

The human-readable name set for the Droplet instance.

Networks DropletNetworks

The details of the network that are configured for the Droplet instance. This is an object that contains keys for IPv4 and IPv6. The value of each of these is an array that contains objects describing an individual IP resource allocated to the Droplet. These will define attributes like the IP address, netmask, and gateway of the specific network depending on the type of network it is.

V4 []NetworkV4optional
Gateway stringoptional

The gateway of the specified IPv4 network interface.

For private interfaces, a gateway is not provided. This is denoted by returning nil as its value.

IPAddress stringoptional

The IP address of the IPv4 network interface.

formatipv4
Netmask stringoptional

The netmask of the IPv4 network interface.

formatipv4
Type NetworkV4Typeoptional

The type of the IPv4 network interface.

Accepts one of the following:
const NetworkV4TypePublic NetworkV4Type = "public"
const NetworkV4TypePrivate NetworkV4Type = "private"
V6 []NetworkV6optional
Gateway stringoptional

The gateway of the specified IPv6 network interface.

formatipv6
IPAddress stringoptional

The IP address of the IPv6 network interface.

formatipv6
Netmask int64optional

The netmask of the IPv6 network interface.

Type NetworkV6Typeoptional

The type of the IPv6 network interface.

Note: IPv6 private networking is not currently supported.

Accepts one of the following:
const NetworkV6TypePublic NetworkV6Type = "public"
NextBackupWindow DropletNextBackupWindow

The details of the Droplet's backups feature, if backups are configured for the Droplet. This object contains keys for the start and end times of the window during which the backup will start.

End Timeoptional

A time value given in ISO8601 combined date and time format specifying the end of the Droplet's backup window.

formatdate-time
Start Timeoptional

A time value given in ISO8601 combined date and time format specifying the start of the Droplet's backup window.

formatdate-time
Region Region
Available bool

This is a boolean value that represents whether new Droplets can be created in this region.

Features []string

This attribute is set to an array which contains features available in this region

Name string

The display name of the region. This will be a full name that is used in the control panel and other interfaces.

Sizes []string

This attribute is set to an array which contains the identifying slugs for the sizes available in this region. sizes:read is required to view.

Slug string

A human-readable string that is used as a unique identifier for each region.

Size Size
Available bool

This is a boolean value that represents whether new Droplets can be created with this size.

Description string

A string describing the class of Droplets created from this size. For example: Basic, General Purpose, CPU-Optimized, Memory-Optimized, or Storage-Optimized.

Disk int64

The amount of disk space set aside for Droplets of this size. The value is represented in gigabytes.

Memory int64

The amount of RAM allocated to Droplets created of this size. The value is represented in megabytes.

multipleOf8
minimum8
PriceHourly float64

This describes the price of the Droplet size as measured hourly. The value is measured in US dollars.

formatfloat
PriceMonthly float64

This attribute describes the monthly cost of this Droplet size if the Droplet is kept for an entire month. The value is measured in US dollars.

formatfloat
Regions []string

An array containing the region slugs where this size is available for Droplet creates.

Slug string

A human-readable string that is used to uniquely identify each size.

Transfer float64

The amount of transfer bandwidth that is available for Droplets created in this size. This only counts traffic on the public interface. The value is given in terabytes.

formatfloat
Vcpus int64

The number of CPUs allocated to Droplets of this size.

DiskInfo []DiskInfooptional

An array of objects containing information about the disks available to Droplets created with this size.

Size DiskInfoSizeoptional
Amount int64optional

The amount of space allocated to the disk.

Unit stringoptional

The unit of measure for the disk size.

Type DiskInfoTypeoptional

The type of disk. All Droplets contain a local disk. Additionally, GPU Droplets can also have a scratch disk for non-persistent data.

Accepts one of the following:
const DiskInfoTypeLocal DiskInfoType = "local"
const DiskInfoTypeScratch DiskInfoType = "scratch"
GPUInfo GPUInfooptional

An object containing information about the GPU capabilities of Droplets created with this size.

Count int64optional

The number of GPUs allocated to the Droplet.

Model stringoptional

The model of the GPU.

Vram GPUInfoVramoptional
Amount int64optional

The amount of VRAM allocated to the GPU.

Unit stringoptional

The unit of measure for the VRAM.

SizeSlug string

The unique slug identifier for the size of this Droplet.

SnapshotIDs []int64

An array of snapshot IDs of any snapshots created from the Droplet instance.
Requires image:read scope.

Status DropletStatus

A status string indicating the state of the Droplet instance. This may be "new", "active", "off", or "archive".

Accepts one of the following:
const DropletStatusNew DropletStatus = "new"
const DropletStatusActive DropletStatus = "active"
const DropletStatusOff DropletStatus = "off"
const DropletStatusArchive DropletStatus = "archive"
Tags []string

An array of Tags the Droplet has been tagged with.
Requires tag:read scope.

Vcpus int64

The number of virtual CPUs.

VolumeIDs []string

A flat array including the unique identifier for each Block Storage volume attached to the Droplet.
Requires block_storage:read scope.

DiskInfo []DiskInfooptional

An array of objects containing information about the disks available to the Droplet.

Size DiskInfoSizeoptional
Amount int64optional

The amount of space allocated to the disk.

Unit stringoptional

The unit of measure for the disk size.

Type DiskInfoTypeoptional

The type of disk. All Droplets contain a local disk. Additionally, GPU Droplets can also have a scratch disk for non-persistent data.

Accepts one of the following:
const DiskInfoTypeLocal DiskInfoType = "local"
const DiskInfoTypeScratch DiskInfoType = "scratch"
GPUInfo GPUInfooptional

An object containing information about the GPU capabilities of Droplets created with this size.

Count int64optional

The number of GPUs allocated to the Droplet.

Model stringoptional

The model of the GPU.

Vram GPUInfoVramoptional
Amount int64optional

The amount of VRAM allocated to the GPU.

Unit stringoptional

The unit of measure for the VRAM.

DeprecatedKernel Kerneloptional

Note: All Droplets created after March 2017 use internal kernels by default. These Droplets will have this attribute set to null.

The current kernel for Droplets with externally managed kernels. This will initially be set to the kernel of the base image when the Droplet is created.

ID int64optional

A unique number used to identify and reference a specific kernel.

Name stringoptional

The display name of the kernel. This is shown in the web UI and is generally a descriptive title for the kernel in question.

Version stringoptional

A standard kernel version string representing the version, patch, and release information.

VpcUuid stringoptional

A string specifying the UUID of the VPC to which the Droplet is assigned.
Requires vpc:read scope.

Create a New Droplet
package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/-go"
  "github.com/stainless-sdks/-go/option"
)

func main() {
  client := gradient.NewClient(
    option.WithAccessToken("My Access Token"),
  )
  gpuDroplet, err := client.GPUDroplets.New(context.TODO(), gradient.GPUDropletNewParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", gpuDroplet)
}
{
  "droplet": {
    "id": 3164444,
    "name": "example.com",
    "memory": 1024,
    "vcpus": 1,
    "disk": 25,
    "disk_info": [
      {
        "type": "local",
        "size": {
          "amount": 25,
          "unit": "gib"
        }
      }
    ],
    "locked": false,
    "status": "new",
    "kernel": null,
    "created_at": "2020-07-21T18:37:44Z",
    "features": [
      "backups",
      "private_networking",
      "ipv6",
      "monitoring"
    ],
    "backup_ids": [],
    "next_backup_window": null,
    "snapshot_ids": [],
    "image": {
      "id": 63663980,
      "name": "20.04 (LTS) x64",
      "distribution": "Ubuntu",
      "slug": "ubuntu-20-04-x64",
      "public": true,
      "regions": [
        "ams2",
        "ams3",
        "blr1",
        "fra1",
        "lon1",
        "nyc1",
        "nyc2",
        "nyc3",
        "sfo1",
        "sfo2",
        "sfo3",
        "sgp1",
        "tor1"
      ],
      "created_at": "2020-05-15T05:47:50Z",
      "type": "snapshot",
      "min_disk_size": 20,
      "size_gigabytes": 2.36,
      "description": "",
      "tags": [],
      "status": "available",
      "error_message": ""
    },
    "volume_ids": [],
    "size": {
      "slug": "s-1vcpu-1gb",
      "memory": 1024,
      "vcpus": 1,
      "disk": 25,
      "transfer": 1,
      "price_monthly": 5,
      "price_hourly": 0.00743999984115362,
      "regions": [
        "ams2",
        "ams3",
        "blr1",
        "fra1",
        "lon1",
        "nyc1",
        "nyc2",
        "nyc3",
        "sfo1",
        "sfo2",
        "sfo3",
        "sgp1",
        "tor1"
      ],
      "available": true,
      "description": "Basic"
    },
    "size_slug": "s-1vcpu-1gb",
    "networks": {
      "v4": [],
      "v6": []
    },
    "region": {
      "name": "New York 3",
      "slug": "nyc3",
      "features": [
        "private_networking",
        "backups",
        "ipv6",
        "metadata",
        "install_agent",
        "storage",
        "image_transfer"
      ],
      "available": true,
      "sizes": [
        "s-1vcpu-1gb",
        "s-1vcpu-2gb",
        "s-1vcpu-3gb",
        "s-2vcpu-2gb",
        "s-3vcpu-1gb",
        "s-2vcpu-4gb",
        "s-4vcpu-8gb",
        "s-6vcpu-16gb",
        "s-8vcpu-32gb",
        "s-12vcpu-48gb",
        "s-16vcpu-64gb",
        "s-20vcpu-96gb",
        "s-24vcpu-128gb",
        "s-32vcpu-192g"
      ]
    },
    "tags": [
      "web",
      "env:prod"
    ]
  },
  "links": {
    "actions": [
      {
        "id": 7515,
        "rel": "create",
        "href": "https://api.digitalocean.com/v2/actions/7515"
      }
    ]
  }
}
Returns Examples
{
  "droplet": {
    "id": 3164444,
    "name": "example.com",
    "memory": 1024,
    "vcpus": 1,
    "disk": 25,
    "disk_info": [
      {
        "type": "local",
        "size": {
          "amount": 25,
          "unit": "gib"
        }
      }
    ],
    "locked": false,
    "status": "new",
    "kernel": null,
    "created_at": "2020-07-21T18:37:44Z",
    "features": [
      "backups",
      "private_networking",
      "ipv6",
      "monitoring"
    ],
    "backup_ids": [],
    "next_backup_window": null,
    "snapshot_ids": [],
    "image": {
      "id": 63663980,
      "name": "20.04 (LTS) x64",
      "distribution": "Ubuntu",
      "slug": "ubuntu-20-04-x64",
      "public": true,
      "regions": [
        "ams2",
        "ams3",
        "blr1",
        "fra1",
        "lon1",
        "nyc1",
        "nyc2",
        "nyc3",
        "sfo1",
        "sfo2",
        "sfo3",
        "sgp1",
        "tor1"
      ],
      "created_at": "2020-05-15T05:47:50Z",
      "type": "snapshot",
      "min_disk_size": 20,
      "size_gigabytes": 2.36,
      "description": "",
      "tags": [],
      "status": "available",
      "error_message": ""
    },
    "volume_ids": [],
    "size": {
      "slug": "s-1vcpu-1gb",
      "memory": 1024,
      "vcpus": 1,
      "disk": 25,
      "transfer": 1,
      "price_monthly": 5,
      "price_hourly": 0.00743999984115362,
      "regions": [
        "ams2",
        "ams3",
        "blr1",
        "fra1",
        "lon1",
        "nyc1",
        "nyc2",
        "nyc3",
        "sfo1",
        "sfo2",
        "sfo3",
        "sgp1",
        "tor1"
      ],
      "available": true,
      "description": "Basic"
    },
    "size_slug": "s-1vcpu-1gb",
    "networks": {
      "v4": [],
      "v6": []
    },
    "region": {
      "name": "New York 3",
      "slug": "nyc3",
      "features": [
        "private_networking",
        "backups",
        "ipv6",
        "metadata",
        "install_agent",
        "storage",
        "image_transfer"
      ],
      "available": true,
      "sizes": [
        "s-1vcpu-1gb",
        "s-1vcpu-2gb",
        "s-1vcpu-3gb",
        "s-2vcpu-2gb",
        "s-3vcpu-1gb",
        "s-2vcpu-4gb",
        "s-4vcpu-8gb",
        "s-6vcpu-16gb",
        "s-8vcpu-32gb",
        "s-12vcpu-48gb",
        "s-16vcpu-64gb",
        "s-20vcpu-96gb",
        "s-24vcpu-128gb",
        "s-32vcpu-192g"
      ]
    },
    "tags": [
      "web",
      "env:prod"
    ]
  },
  "links": {
    "actions": [
      {
        "id": 7515,
        "rel": "create",
        "href": "https://api.digitalocean.com/v2/actions/7515"
      }
    ]
  }
}