Skip to content

GPU Droplets

List All Droplets
client.GPUDroplets.List(ctx, query) (*GPUDropletListResponse, error)
get/v2/droplets
Create a New Droplet
client.GPUDroplets.New(ctx, body) (*GPUDropletNewResponse, error)
post/v2/droplets
Deleting Droplets by Tag
client.GPUDroplets.DeleteByTag(ctx, body) error
delete/v2/droplets
Retrieve an Existing Droplet
client.GPUDroplets.Get(ctx, dropletID) (*GPUDropletGetResponse, error)
get/v2/droplets/{droplet_id}
Delete an Existing Droplet
client.GPUDroplets.Delete(ctx, dropletID) error
delete/v2/droplets/{droplet_id}
List Snapshots for a Droplet
client.GPUDroplets.ListSnapshots(ctx, dropletID, query) (*GPUDropletListSnapshotsResponse, error)
get/v2/droplets/{droplet_id}/snapshots
List All Available Kernels for a Droplet
client.GPUDroplets.ListKernels(ctx, dropletID, query) (*GPUDropletListKernelsResponse, error)
get/v2/droplets/{droplet_id}/kernels
List all Firewalls Applied to a Droplet
client.GPUDroplets.ListFirewalls(ctx, dropletID, query) (*GPUDropletListFirewallsResponse, error)
get/v2/droplets/{droplet_id}/firewalls
List Neighbors for a Droplet
client.GPUDroplets.ListNeighbors(ctx, dropletID) (*GPUDropletListNeighborsResponse, error)
get/v2/droplets/{droplet_id}/neighbors
ModelsExpand Collapse
type DropletBackupPolicy struct{…}
Hour DropletBackupPolicyHouroptional

The hour of the day that the backup window will start.

Accepts one of the following:
const DropletBackupPolicyHour0 DropletBackupPolicyHour = 0
const DropletBackupPolicyHour4 DropletBackupPolicyHour = 4
const DropletBackupPolicyHour8 DropletBackupPolicyHour = 8
const DropletBackupPolicyHour12 DropletBackupPolicyHour = 12
const DropletBackupPolicyHour16 DropletBackupPolicyHour = 16
const DropletBackupPolicyHour20 DropletBackupPolicyHour = 20
Plan DropletBackupPolicyPlanoptional

The backup plan used for the Droplet. The plan can be either daily or weekly.

Accepts one of the following:
const DropletBackupPolicyPlanDaily DropletBackupPolicyPlan = "daily"
const DropletBackupPolicyPlanWeekly DropletBackupPolicyPlan = "weekly"
RetentionPeriodDays int64optional

The number of days the backup will be retained.

Weekday DropletBackupPolicyWeekdayoptional

The day of the week on which the backup will occur.

Accepts one of the following:
const DropletBackupPolicyWeekdaySun DropletBackupPolicyWeekday = "SUN"
const DropletBackupPolicyWeekdayMon DropletBackupPolicyWeekday = "MON"
const DropletBackupPolicyWeekdayTue DropletBackupPolicyWeekday = "TUE"
const DropletBackupPolicyWeekdayWed DropletBackupPolicyWeekday = "WED"
const DropletBackupPolicyWeekdayThu DropletBackupPolicyWeekday = "THU"
const DropletBackupPolicyWeekdayFri DropletBackupPolicyWeekday = "FRI"
const DropletBackupPolicyWeekdaySat DropletBackupPolicyWeekday = "SAT"
WindowLengthHours int64optional

The length of the backup window starting from hour.

GPU DropletsBackups

List Backups for a Droplet
client.GPUDroplets.Backups.List(ctx, dropletID, query) (*GPUDropletBackupListResponse, error)
get/v2/droplets/{droplet_id}/backups
Retrieve the Backup Policy for an Existing Droplet
client.GPUDroplets.Backups.GetPolicy(ctx, dropletID) (*GPUDropletBackupGetPolicyResponse, error)
get/v2/droplets/{droplet_id}/backups/policy
List Backup Policies for All Existing Droplets
client.GPUDroplets.Backups.ListPolicies(ctx, query) (*GPUDropletBackupListPoliciesResponse, error)
get/v2/droplets/backups/policies
List Supported Droplet Backup Policies
client.GPUDroplets.Backups.ListSupportedPolicies(ctx) (*GPUDropletBackupListSupportedPoliciesResponse, error)
get/v2/droplets/backups/supported_policies

GPU DropletsActions

List Actions for a Droplet
client.GPUDroplets.Actions.List(ctx, dropletID, query) (*GPUDropletActionListResponse, error)
get/v2/droplets/{droplet_id}/actions
Initiate a Droplet Action
client.GPUDroplets.Actions.Initiate(ctx, dropletID, body) (*GPUDropletActionInitiateResponse, error)
post/v2/droplets/{droplet_id}/actions
Acting on Tagged Droplets
client.GPUDroplets.Actions.BulkInitiate(ctx, params) (*GPUDropletActionBulkInitiateResponse, error)
post/v2/droplets/actions
Retrieve a Droplet Action
client.GPUDroplets.Actions.Get(ctx, dropletID, actionID) (*GPUDropletActionGetResponse, error)
get/v2/droplets/{droplet_id}/actions/{action_id}

GPU DropletsDestroy With Associated Resources

List Associated Resources for a Droplet
client.GPUDroplets.DestroyWithAssociatedResources.List(ctx, dropletID) (*GPUDropletDestroyWithAssociatedResourceListResponse, error)
get/v2/droplets/{droplet_id}/destroy_with_associated_resources
Selectively Destroy a Droplet and its Associated Resources
client.GPUDroplets.DestroyWithAssociatedResources.DeleteSelective(ctx, dropletID, body) error
delete/v2/droplets/{droplet_id}/destroy_with_associated_resources/selective
Destroy a Droplet and All of its Associated Resources (Dangerous)
client.GPUDroplets.DestroyWithAssociatedResources.DeleteDangerous(ctx, dropletID, body) error
delete/v2/droplets/{droplet_id}/destroy_with_associated_resources/dangerous
Check Status of a Droplet Destroy with Associated Resources Request
client.GPUDroplets.DestroyWithAssociatedResources.CheckStatus(ctx, dropletID) (*GPUDropletDestroyWithAssociatedResourceCheckStatusResponse, error)
get/v2/droplets/{droplet_id}/destroy_with_associated_resources/status
Retry a Droplet Destroy with Associated Resources Request
client.GPUDroplets.DestroyWithAssociatedResources.Retry(ctx, dropletID) error
post/v2/droplets/{droplet_id}/destroy_with_associated_resources/retry
ModelsExpand Collapse
type AssociatedResource struct{…}

An objects containing information about a resource associated with a Droplet.

ID stringoptional

The unique identifier for the resource associated with the Droplet.

Cost stringoptional

The cost of the resource in USD per month if the resource is retained after the Droplet is destroyed.

Name stringoptional

The name of the resource associated with the Droplet.

type DestroyedAssociatedResource struct{…}

An object containing information about a resource scheduled for deletion.

ID stringoptional

The unique identifier for the resource scheduled for deletion.

DestroyedAt Timeoptional

A time value given in ISO8601 combined date and time format indicating when the resource was destroyed if the request was successful.

formatdate-time
ErrorMessage stringoptional

A string indicating that the resource was not successfully destroyed and providing additional information.

Name stringoptional

The name of the resource scheduled for deletion.

GPU DropletsAutoscale

List All Autoscale Pools
client.GPUDroplets.Autoscale.List(ctx, query) (*GPUDropletAutoscaleListResponse, error)
get/v2/droplets/autoscale
Create a New Autoscale Pool
client.GPUDroplets.Autoscale.New(ctx, body) (*GPUDropletAutoscaleNewResponse, error)
post/v2/droplets/autoscale
Retrieve an Existing Autoscale Pool
client.GPUDroplets.Autoscale.Get(ctx, autoscalePoolID) (*GPUDropletAutoscaleGetResponse, error)
get/v2/droplets/autoscale/{autoscale_pool_id}
Update Autoscale Pool
client.GPUDroplets.Autoscale.Update(ctx, autoscalePoolID, body) (*GPUDropletAutoscaleUpdateResponse, error)
put/v2/droplets/autoscale/{autoscale_pool_id}
Delete autoscale pool
client.GPUDroplets.Autoscale.Delete(ctx, autoscalePoolID) error
delete/v2/droplets/autoscale/{autoscale_pool_id}
Delete autoscale pool and resources
client.GPUDroplets.Autoscale.DeleteDangerous(ctx, autoscalePoolID, body) error
delete/v2/droplets/autoscale/{autoscale_pool_id}/dangerous
List members
client.GPUDroplets.Autoscale.ListMembers(ctx, autoscalePoolID, query) (*GPUDropletAutoscaleListMembersResponse, error)
get/v2/droplets/autoscale/{autoscale_pool_id}/members
List history events
client.GPUDroplets.Autoscale.ListHistory(ctx, autoscalePoolID, query) (*GPUDropletAutoscaleListHistoryResponse, error)
get/v2/droplets/autoscale/{autoscale_pool_id}/history
ModelsExpand Collapse
type AutoscalePool struct{…}
ID string

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

ActiveResourcesCount int64

The number of active Droplets in the autoscale pool.

Config AutoscalePoolConfig

The scaling configuration for an autoscale pool, which is how the pool scales up and down (either by resource utilization or static configuration).

Accepts one of the following:
type AutoscalePoolStaticConfig struct{…}
TargetNumberInstances int64

Fixed number of instances in an autoscale pool.

minimum1
maximum1000
type AutoscalePoolDynamicConfig struct{…}
MaxInstances int64

The maximum number of Droplets in an autoscale pool.

minimum1
maximum1000
MinInstances int64

The minimum number of Droplets in an autoscale pool.

minimum1
maximum500
CooldownMinutes int64optional

The number of minutes to wait between scaling events in an autoscale pool. Defaults to 10 minutes.

minimum5
maximum20
TargetCPUUtilization float64optional

Target CPU utilization as a decimal.

formatfloat
minimum0.05
maximum1
TargetMemoryUtilization float64optional

Target memory utilization as a decimal.

formatfloat
minimum0.05
maximum1
CreatedAt Time

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

formatdate-time
Image string

The Droplet image to be used for all Droplets in the autoscale pool. You may specify the slug or the image ID.

Region AutoscalePoolDropletTemplateRegion

The datacenter in which all of the Droplets will be created.

Accepts one of the following:
const AutoscalePoolDropletTemplateRegionNyc1 AutoscalePoolDropletTemplateRegion = "nyc1"
const AutoscalePoolDropletTemplateRegionNyc2 AutoscalePoolDropletTemplateRegion = "nyc2"
const AutoscalePoolDropletTemplateRegionNyc3 AutoscalePoolDropletTemplateRegion = "nyc3"
const AutoscalePoolDropletTemplateRegionAms2 AutoscalePoolDropletTemplateRegion = "ams2"
const AutoscalePoolDropletTemplateRegionAms3 AutoscalePoolDropletTemplateRegion = "ams3"
const AutoscalePoolDropletTemplateRegionSfo1 AutoscalePoolDropletTemplateRegion = "sfo1"
const AutoscalePoolDropletTemplateRegionSfo2 AutoscalePoolDropletTemplateRegion = "sfo2"
const AutoscalePoolDropletTemplateRegionSfo3 AutoscalePoolDropletTemplateRegion = "sfo3"
const AutoscalePoolDropletTemplateRegionSgp1 AutoscalePoolDropletTemplateRegion = "sgp1"
const AutoscalePoolDropletTemplateRegionLon1 AutoscalePoolDropletTemplateRegion = "lon1"
const AutoscalePoolDropletTemplateRegionFra1 AutoscalePoolDropletTemplateRegion = "fra1"
const AutoscalePoolDropletTemplateRegionTor1 AutoscalePoolDropletTemplateRegion = "tor1"
const AutoscalePoolDropletTemplateRegionBlr1 AutoscalePoolDropletTemplateRegion = "blr1"
const AutoscalePoolDropletTemplateRegionSyd1 AutoscalePoolDropletTemplateRegion = "syd1"
Size string

The Droplet size to be used for all Droplets in the autoscale pool.

SSHKeys []string

The SSH keys to be installed on the Droplets in the autoscale pool. You can either specify the key ID or the fingerprint. Requires ssh_key:read scope.

Ipv6 booloptional

Assigns a unique IPv6 address to each of the Droplets in the autoscale pool.

Name stringoptional

The name(s) to be applied to all Droplets in the autoscale pool.

ProjectID stringoptional

The project that the Droplets in the autoscale pool will belong to. Requires project:read scope.

Tags []stringoptional

The tags to apply to each of the Droplets in the autoscale pool. Requires tag:read scope.

UserData stringoptional

A string containing user data that cloud-init consumes to configure a Droplet on first boot. User data is often a cloud-config file or Bash script. It must be plain text and may not exceed 64 KiB in size.

VpcUuid stringoptional

The VPC where the Droplets in the autoscale pool will be created. The VPC must be in the region where you want to create the Droplets. Requires vpc:read scope.

WithDropletAgent booloptional

Installs the Droplet agent. This must be set to true to monitor Droplets for resource utilization scaling.

Name string

The human-readable name set for the autoscale pool.

Status AutoscalePoolStatus

The current status of the autoscale pool.

Accepts one of the following:
const AutoscalePoolStatusActive AutoscalePoolStatus = "active"
const AutoscalePoolStatusDeleting AutoscalePoolStatus = "deleting"
const AutoscalePoolStatusError AutoscalePoolStatus = "error"
UpdatedAt Time

A time value given in ISO8601 combined date and time format that represents when the autoscale pool was last updated.

formatdate-time
CurrentUtilization CurrentUtilizationoptional
CPU float64optional

The average CPU utilization of the autoscale pool.

formatfloat
minimum0
maximum1
Memory float64optional

The average memory utilization of the autoscale pool.

formatfloat
minimum0
maximum1
type AutoscalePoolDropletTemplate struct{…}
Image string

The Droplet image to be used for all Droplets in the autoscale pool. You may specify the slug or the image ID.

Region AutoscalePoolDropletTemplateRegion

The datacenter in which all of the Droplets will be created.

Accepts one of the following:
const AutoscalePoolDropletTemplateRegionNyc1 AutoscalePoolDropletTemplateRegion = "nyc1"
const AutoscalePoolDropletTemplateRegionNyc2 AutoscalePoolDropletTemplateRegion = "nyc2"
const AutoscalePoolDropletTemplateRegionNyc3 AutoscalePoolDropletTemplateRegion = "nyc3"
const AutoscalePoolDropletTemplateRegionAms2 AutoscalePoolDropletTemplateRegion = "ams2"
const AutoscalePoolDropletTemplateRegionAms3 AutoscalePoolDropletTemplateRegion = "ams3"
const AutoscalePoolDropletTemplateRegionSfo1 AutoscalePoolDropletTemplateRegion = "sfo1"
const AutoscalePoolDropletTemplateRegionSfo2 AutoscalePoolDropletTemplateRegion = "sfo2"
const AutoscalePoolDropletTemplateRegionSfo3 AutoscalePoolDropletTemplateRegion = "sfo3"
const AutoscalePoolDropletTemplateRegionSgp1 AutoscalePoolDropletTemplateRegion = "sgp1"
const AutoscalePoolDropletTemplateRegionLon1 AutoscalePoolDropletTemplateRegion = "lon1"
const AutoscalePoolDropletTemplateRegionFra1 AutoscalePoolDropletTemplateRegion = "fra1"
const AutoscalePoolDropletTemplateRegionTor1 AutoscalePoolDropletTemplateRegion = "tor1"
const AutoscalePoolDropletTemplateRegionBlr1 AutoscalePoolDropletTemplateRegion = "blr1"
const AutoscalePoolDropletTemplateRegionSyd1 AutoscalePoolDropletTemplateRegion = "syd1"
Size string

The Droplet size to be used for all Droplets in the autoscale pool.

SSHKeys []string

The SSH keys to be installed on the Droplets in the autoscale pool. You can either specify the key ID or the fingerprint. Requires ssh_key:read scope.

Ipv6 booloptional

Assigns a unique IPv6 address to each of the Droplets in the autoscale pool.

Name stringoptional

The name(s) to be applied to all Droplets in the autoscale pool.

ProjectID stringoptional

The project that the Droplets in the autoscale pool will belong to. Requires project:read scope.

Tags []stringoptional

The tags to apply to each of the Droplets in the autoscale pool. Requires tag:read scope.

UserData stringoptional

A string containing user data that cloud-init consumes to configure a Droplet on first boot. User data is often a cloud-config file or Bash script. It must be plain text and may not exceed 64 KiB in size.

VpcUuid stringoptional

The VPC where the Droplets in the autoscale pool will be created. The VPC must be in the region where you want to create the Droplets. Requires vpc:read scope.

WithDropletAgent booloptional

Installs the Droplet agent. This must be set to true to monitor Droplets for resource utilization scaling.

type AutoscalePoolDynamicConfig struct{…}
MaxInstances int64

The maximum number of Droplets in an autoscale pool.

minimum1
maximum1000
MinInstances int64

The minimum number of Droplets in an autoscale pool.

minimum1
maximum500
CooldownMinutes int64optional

The number of minutes to wait between scaling events in an autoscale pool. Defaults to 10 minutes.

minimum5
maximum20
TargetCPUUtilization float64optional

Target CPU utilization as a decimal.

formatfloat
minimum0.05
maximum1
TargetMemoryUtilization float64optional

Target memory utilization as a decimal.

formatfloat
minimum0.05
maximum1
type AutoscalePoolStaticConfig struct{…}
TargetNumberInstances int64

Fixed number of instances in an autoscale pool.

minimum1
maximum1000
type CurrentUtilization struct{…}
CPU float64optional

The average CPU utilization of the autoscale pool.

formatfloat
minimum0
maximum1
Memory float64optional

The average memory utilization of the autoscale pool.

formatfloat
minimum0
maximum1

GPU DropletsFirewalls

List All Firewalls
client.GPUDroplets.Firewalls.List(ctx, query) (*GPUDropletFirewallListResponse, error)
get/v2/firewalls
Create a New Firewall
client.GPUDroplets.Firewalls.New(ctx, body) (*GPUDropletFirewallNewResponse, error)
post/v2/firewalls
Retrieve an Existing Firewall
client.GPUDroplets.Firewalls.Get(ctx, firewallID) (*GPUDropletFirewallGetResponse, error)
get/v2/firewalls/{firewall_id}
Update a Firewall
client.GPUDroplets.Firewalls.Update(ctx, firewallID, body) (*GPUDropletFirewallUpdateResponse, error)
put/v2/firewalls/{firewall_id}
Delete a Firewall
client.GPUDroplets.Firewalls.Delete(ctx, firewallID) error
delete/v2/firewalls/{firewall_id}
ModelsExpand Collapse
type Firewall struct{…}
ID stringoptional

A unique ID that can be used to identify and reference a firewall.

CreatedAt Timeoptional

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

formatdate-time
DropletIDs []int64optional

An array containing the IDs of the Droplets assigned to the firewall.

Requires droplet:read scope.

InboundRules []FirewallInboundRuleoptional
Ports string

The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. "8000-9000"), or "0" when all ports are open for a protocol. For ICMP rules this parameter will always return "0".

Protocol FirewallInboundRulesProtocol

The type of traffic to be allowed. This may be one of tcp, udp, or icmp.

Accepts one of the following:
const FirewallInboundRulesProtocolTcp FirewallInboundRulesProtocol = "tcp"
const FirewallInboundRulesProtocolUdp FirewallInboundRulesProtocol = "udp"
const FirewallInboundRulesProtocolIcmp FirewallInboundRulesProtocol = "icmp"

An object specifying locations from which inbound traffic will be accepted.

Addresses []stringoptional

An array of strings containing the IPv4 addresses, IPv6 addresses, IPv4 CIDRs, and/or IPv6 CIDRs to which the firewall will allow traffic.

DropletIDs []int64optional

An array containing the IDs of the Droplets to which the firewall will allow traffic.

KubernetesIDs []stringoptional

An array containing the IDs of the Kubernetes clusters to which the firewall will allow traffic.

LoadBalancerUids []stringoptional

An array containing the IDs of the load balancers to which the firewall will allow traffic.

Tags []stringoptional

A flat array of tag names as strings to be applied to the resource. Tag names must exist in order to be referenced in a request.

Requires tag:create and tag:read scopes.

Name stringoptional

A human-readable name for a firewall. The name must begin with an alphanumeric character. Subsequent characters must either be alphanumeric characters, a period (.), or a dash (-).

OutboundRules []FirewallOutboundRuleoptional
Destinations FirewallRuleTarget

An object specifying locations to which outbound traffic that will be allowed.

Addresses []stringoptional

An array of strings containing the IPv4 addresses, IPv6 addresses, IPv4 CIDRs, and/or IPv6 CIDRs to which the firewall will allow traffic.

DropletIDs []int64optional

An array containing the IDs of the Droplets to which the firewall will allow traffic.

KubernetesIDs []stringoptional

An array containing the IDs of the Kubernetes clusters to which the firewall will allow traffic.

LoadBalancerUids []stringoptional

An array containing the IDs of the load balancers to which the firewall will allow traffic.

Tags []stringoptional

A flat array of tag names as strings to be applied to the resource. Tag names must exist in order to be referenced in a request.

Requires tag:create and tag:read scopes.

Ports string

The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. "8000-9000"), or "0" when all ports are open for a protocol. For ICMP rules this parameter will always return "0".

Protocol FirewallOutboundRulesProtocol

The type of traffic to be allowed. This may be one of tcp, udp, or icmp.

Accepts one of the following:
const FirewallOutboundRulesProtocolTcp FirewallOutboundRulesProtocol = "tcp"
const FirewallOutboundRulesProtocolUdp FirewallOutboundRulesProtocol = "udp"
const FirewallOutboundRulesProtocolIcmp FirewallOutboundRulesProtocol = "icmp"
PendingChanges []FirewallPendingChangeoptional

An array of objects each containing the fields "droplet_id", "removing", and "status". It is provided to detail exactly which Droplets are having their security policies updated. When empty, all changes have been successfully applied.

DropletID int64optional
Removing booloptional
Status stringoptional
Status FirewallStatusoptional

A status string indicating the current state of the firewall. This can be "waiting", "succeeded", or "failed".

Accepts one of the following:
const FirewallStatusWaiting FirewallStatus = "waiting"
const FirewallStatusSucceeded FirewallStatus = "succeeded"
const FirewallStatusFailed FirewallStatus = "failed"
Tags []stringoptional

A flat array of tag names as strings to be applied to the resource. Tag names must exist in order to be referenced in a request.

Requires tag:create and tag:read scopes.

GPU DropletsFirewallsDroplets

Add Droplets to a Firewall
client.GPUDroplets.Firewalls.Droplets.Add(ctx, firewallID, body) error
post/v2/firewalls/{firewall_id}/droplets
Remove Droplets from a Firewall
client.GPUDroplets.Firewalls.Droplets.Remove(ctx, firewallID, body) error
delete/v2/firewalls/{firewall_id}/droplets

GPU DropletsFirewallsTags

Add Tags to a Firewall
client.GPUDroplets.Firewalls.Tags.Add(ctx, firewallID, body) error
post/v2/firewalls/{firewall_id}/tags
Remove Tags from a Firewall
client.GPUDroplets.Firewalls.Tags.Remove(ctx, firewallID, body) error
delete/v2/firewalls/{firewall_id}/tags

GPU DropletsFirewallsRules

Add Rules to a Firewall
client.GPUDroplets.Firewalls.Rules.Add(ctx, firewallID, body) error
post/v2/firewalls/{firewall_id}/rules
Remove Rules from a Firewall
client.GPUDroplets.Firewalls.Rules.Remove(ctx, firewallID, body) error
delete/v2/firewalls/{firewall_id}/rules

GPU DropletsFloating IPs

List All Floating IPs
client.GPUDroplets.FloatingIPs.List(ctx, query) (*GPUDropletFloatingIPListResponse, error)
get/v2/floating_ips
Create a New Floating IP
client.GPUDroplets.FloatingIPs.New(ctx, body) (*GPUDropletFloatingIPNewResponse, error)
post/v2/floating_ips
Retrieve an Existing Floating IP
client.GPUDroplets.FloatingIPs.Get(ctx, floatingIP) (*GPUDropletFloatingIPGetResponse, error)
get/v2/floating_ips/{floating_ip}
Delete a Floating IP
client.GPUDroplets.FloatingIPs.Delete(ctx, floatingIP) error
delete/v2/floating_ips/{floating_ip}
ModelsExpand Collapse
type FloatingIP struct{…}
Droplet Dropletoptional

The Droplet that the floating IP has been assigned to. When you query a floating IP, if it is assigned to a Droplet, the entire Droplet object will be returned. If it is not assigned, the value will be null.

Requires droplet:read scope.

Accepts one of the following:
type Droplet struct{…}
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.

IP stringoptional

The public IP address of the floating IP. It also serves as its identifier.

formatipv4
Locked booloptional

A boolean value indicating whether or not the floating IP has pending actions preventing new ones from being submitted.

ProjectID stringoptional

The UUID of the project to which the reserved IP currently belongs.

Requires project:read scope.

formatuuid
Region FloatingIPRegionoptional

The region that the floating IP is reserved to. When you query a floating IP, the entire region object will be returned.

GPU DropletsFloating IPsActions

List All Actions for a Floating IP
client.GPUDroplets.FloatingIPs.Actions.List(ctx, floatingIP) (*GPUDropletFloatingIPActionListResponse, error)
get/v2/floating_ips/{floating_ip}/actions
Initiate a Floating IP Action
client.GPUDroplets.FloatingIPs.Actions.New(ctx, floatingIP, body) (*GPUDropletFloatingIPActionNewResponse, error)
post/v2/floating_ips/{floating_ip}/actions
Retrieve an Existing Floating IP Action
client.GPUDroplets.FloatingIPs.Actions.Get(ctx, floatingIP, actionID) (*GPUDropletFloatingIPActionGetResponse, error)
get/v2/floating_ips/{floating_ip}/actions/{action_id}

GPU DropletsImages

List All Images
client.GPUDroplets.Images.List(ctx, query) (*GPUDropletImageListResponse, error)
get/v2/images
Create a Custom Image
client.GPUDroplets.Images.New(ctx, body) (*GPUDropletImageNewResponse, error)
post/v2/images
Retrieve an Existing Image
client.GPUDroplets.Images.Get(ctx, imageID) (*GPUDropletImageGetResponse, error)
get/v2/images/{image_id}
Update an Image
client.GPUDroplets.Images.Update(ctx, imageID, body) (*GPUDropletImageUpdateResponse, error)
put/v2/images/{image_id}
Delete an Image
client.GPUDroplets.Images.Delete(ctx, imageID) error
delete/v2/images/{image_id}

GPU DropletsImagesActions

List All Actions for an Image
client.GPUDroplets.Images.Actions.List(ctx, imageID) (*GPUDropletImageActionListResponse, error)
get/v2/images/{image_id}/actions
Initiate an Image Action
client.GPUDroplets.Images.Actions.New(ctx, imageID, body) (*Action, error)
post/v2/images/{image_id}/actions
Retrieve an Existing Action
client.GPUDroplets.Images.Actions.Get(ctx, imageID, actionID) (*Action, error)
get/v2/images/{image_id}/actions/{action_id}

GPU DropletsLoad Balancers

Create a New Load Balancer
client.GPUDroplets.LoadBalancers.New(ctx, body) (*GPUDropletLoadBalancerNewResponse, error)
post/v2/load_balancers
List All Load Balancers
client.GPUDroplets.LoadBalancers.List(ctx, query) (*GPUDropletLoadBalancerListResponse, error)
get/v2/load_balancers
Retrieve an Existing Load Balancer
client.GPUDroplets.LoadBalancers.Get(ctx, lbID) (*GPUDropletLoadBalancerGetResponse, error)
get/v2/load_balancers/{lb_id}
Update a Load Balancer
client.GPUDroplets.LoadBalancers.Update(ctx, lbID, body) (*GPUDropletLoadBalancerUpdateResponse, error)
put/v2/load_balancers/{lb_id}
Delete a Load Balancer
client.GPUDroplets.LoadBalancers.Delete(ctx, lbID) error
delete/v2/load_balancers/{lb_id}
Delete a Global Load Balancer CDN Cache
client.GPUDroplets.LoadBalancers.DeleteCache(ctx, lbID) error
delete/v2/load_balancers/{lb_id}/cache
ModelsExpand Collapse
type Domains struct{…}

An object specifying domain configurations for a Global load balancer.

CertificateID stringoptional

The ID of the TLS certificate used for SSL termination.

IsManaged booloptional

A boolean value indicating if the domain is already managed by DigitalOcean. If true, all A and AAAA records required to enable Global load balancers will be automatically added.

Name stringoptional

FQDN to associate with a Global load balancer.

type ForwardingRule struct{…}

An object specifying a forwarding rule for a load balancer.

EntryPort int64

An integer representing the port on which the load balancer instance will listen.

EntryProtocol ForwardingRuleEntryProtocol

The protocol used for traffic to the load balancer. The possible values are: http, https, http2, http3, tcp, or udp. If you set the entry_protocol to udp, the target_protocol must be set to udp. When using UDP, the load balancer requires that you set up a health check with a port that uses TCP, HTTP, or HTTPS to work properly.

Accepts one of the following:
const ForwardingRuleEntryProtocolHTTP ForwardingRuleEntryProtocol = "http"
const ForwardingRuleEntryProtocolHTTPS ForwardingRuleEntryProtocol = "https"
const ForwardingRuleEntryProtocolHttp2 ForwardingRuleEntryProtocol = "http2"
const ForwardingRuleEntryProtocolHttp3 ForwardingRuleEntryProtocol = "http3"
const ForwardingRuleEntryProtocolTcp ForwardingRuleEntryProtocol = "tcp"
const ForwardingRuleEntryProtocolUdp ForwardingRuleEntryProtocol = "udp"
TargetPort int64

An integer representing the port on the backend Droplets to which the load balancer will send traffic.

TargetProtocol ForwardingRuleTargetProtocol

The protocol used for traffic from the load balancer to the backend Droplets. The possible values are: http, https, http2, tcp, or udp. If you set the target_protocol to udp, the entry_protocol must be set to udp. When using UDP, the load balancer requires that you set up a health check with a port that uses TCP, HTTP, or HTTPS to work properly.

Accepts one of the following:
const ForwardingRuleTargetProtocolHTTP ForwardingRuleTargetProtocol = "http"
const ForwardingRuleTargetProtocolHTTPS ForwardingRuleTargetProtocol = "https"
const ForwardingRuleTargetProtocolHttp2 ForwardingRuleTargetProtocol = "http2"
const ForwardingRuleTargetProtocolTcp ForwardingRuleTargetProtocol = "tcp"
const ForwardingRuleTargetProtocolUdp ForwardingRuleTargetProtocol = "udp"
CertificateID stringoptional

The ID of the TLS certificate used for SSL termination if enabled.

TlsPassthrough booloptional

A boolean value indicating whether SSL encrypted traffic will be passed through to the backend Droplets.

type GlbSettings struct{…}

An object specifying forwarding configurations for a Global load balancer.

Cdn GlbSettingsCdnoptional

An object specifying CDN configurations for a Global load balancer.

IsEnabled booloptional

A boolean flag to enable CDN caching.

FailoverThreshold int64optional

An integer value as a percentage to indicate failure threshold to decide how the regional priorities will take effect. A value of 50 would indicate that the Global load balancer will choose a lower priority region to forward traffic to once this failure threshold has been reached for the higher priority region.

RegionPriorities map[string, int64]optional

A map of region string to an integer priority value indicating preference for which regional target a Global load balancer will forward traffic to. A lower value indicates a higher priority.

TargetPort int64optional

An integer representing the port on the target backends which the load balancer will forward traffic to.

TargetProtocol GlbSettingsTargetProtocoloptional

The protocol used for forwarding traffic from the load balancer to the target backends. The possible values are http, https and http2.

Accepts one of the following:
const GlbSettingsTargetProtocolHTTP GlbSettingsTargetProtocol = "http"
const GlbSettingsTargetProtocolHTTPS GlbSettingsTargetProtocol = "https"
const GlbSettingsTargetProtocolHttp2 GlbSettingsTargetProtocol = "http2"
type HealthCheck struct{…}

An object specifying health check settings for the load balancer.

CheckIntervalSeconds int64optional

The number of seconds between between two consecutive health checks.

HealthyThreshold int64optional

The number of times a health check must pass for a backend Droplet to be marked "healthy" and be re-added to the pool.

Path stringoptional

The path on the backend Droplets to which the load balancer instance will send a request.

Port int64optional

An integer representing the port on the backend Droplets on which the health check will attempt a connection.

Protocol HealthCheckProtocoloptional

The protocol used for health checks sent to the backend Droplets. The possible values are http, https, or tcp.

Accepts one of the following:
const HealthCheckProtocolHTTP HealthCheckProtocol = "http"
const HealthCheckProtocolHTTPS HealthCheckProtocol = "https"
const HealthCheckProtocolTcp HealthCheckProtocol = "tcp"
ResponseTimeoutSeconds int64optional

The number of seconds the load balancer instance will wait for a response until marking a health check as failed.

UnhealthyThreshold int64optional

The number of times a health check must fail for a backend Droplet to be marked "unhealthy" and be removed from the pool.

type LbFirewall struct{…}

An object specifying allow and deny rules to control traffic to the load balancer.

Allow []stringoptional

the rules for allowing traffic to the load balancer (in the form 'ip:1.2.3.4' or 'cidr:1.2.0.0/16')

Deny []stringoptional

the rules for denying traffic to the load balancer (in the form 'ip:1.2.3.4' or 'cidr:1.2.0.0/16')

type LoadBalancer struct{…}
ForwardingRules []ForwardingRule

An array of objects specifying the forwarding rules for a load balancer.

EntryPort int64

An integer representing the port on which the load balancer instance will listen.

EntryProtocol ForwardingRuleEntryProtocol

The protocol used for traffic to the load balancer. The possible values are: http, https, http2, http3, tcp, or udp. If you set the entry_protocol to udp, the target_protocol must be set to udp. When using UDP, the load balancer requires that you set up a health check with a port that uses TCP, HTTP, or HTTPS to work properly.

Accepts one of the following:
const ForwardingRuleEntryProtocolHTTP ForwardingRuleEntryProtocol = "http"
const ForwardingRuleEntryProtocolHTTPS ForwardingRuleEntryProtocol = "https"
const ForwardingRuleEntryProtocolHttp2 ForwardingRuleEntryProtocol = "http2"
const ForwardingRuleEntryProtocolHttp3 ForwardingRuleEntryProtocol = "http3"
const ForwardingRuleEntryProtocolTcp ForwardingRuleEntryProtocol = "tcp"
const ForwardingRuleEntryProtocolUdp ForwardingRuleEntryProtocol = "udp"
TargetPort int64

An integer representing the port on the backend Droplets to which the load balancer will send traffic.

TargetProtocol ForwardingRuleTargetProtocol

The protocol used for traffic from the load balancer to the backend Droplets. The possible values are: http, https, http2, tcp, or udp. If you set the target_protocol to udp, the entry_protocol must be set to udp. When using UDP, the load balancer requires that you set up a health check with a port that uses TCP, HTTP, or HTTPS to work properly.

Accepts one of the following:
const ForwardingRuleTargetProtocolHTTP ForwardingRuleTargetProtocol = "http"
const ForwardingRuleTargetProtocolHTTPS ForwardingRuleTargetProtocol = "https"
const ForwardingRuleTargetProtocolHttp2 ForwardingRuleTargetProtocol = "http2"
const ForwardingRuleTargetProtocolTcp ForwardingRuleTargetProtocol = "tcp"
const ForwardingRuleTargetProtocolUdp ForwardingRuleTargetProtocol = "udp"
CertificateID stringoptional

The ID of the TLS certificate used for SSL termination if enabled.

TlsPassthrough booloptional

A boolean value indicating whether SSL encrypted traffic will be passed through to the backend Droplets.

ID stringoptional

A unique ID that can be used to identify and reference a load balancer.

formatuuid
DeprecatedAlgorithm LoadBalancerAlgorithmoptional

This field has been deprecated. You can no longer specify an algorithm for load balancers.

Accepts one of the following:
const LoadBalancerAlgorithmRoundRobin LoadBalancerAlgorithm = "round_robin"
const LoadBalancerAlgorithmLeastConnections LoadBalancerAlgorithm = "least_connections"
CreatedAt Timeoptional

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

formatdate-time
DisableLetsEncryptDNSRecords booloptional

A boolean value indicating whether to disable automatic DNS record creation for Let's Encrypt certificates that are added to the load balancer.

Domains []Domainsoptional

An array of objects specifying the domain configurations for a Global load balancer.

CertificateID stringoptional

The ID of the TLS certificate used for SSL termination.

IsManaged booloptional

A boolean value indicating if the domain is already managed by DigitalOcean. If true, all A and AAAA records required to enable Global load balancers will be automatically added.

Name stringoptional

FQDN to associate with a Global load balancer.

DropletIDs []int64optional

An array containing the IDs of the Droplets assigned to the load balancer.

EnableBackendKeepalive booloptional

A boolean value indicating whether HTTP keepalive connections are maintained to target Droplets.

EnableProxyProtocol booloptional

A boolean value indicating whether PROXY Protocol is in use.

Firewall LbFirewalloptional

An object specifying allow and deny rules to control traffic to the load balancer.

Allow []stringoptional

the rules for allowing traffic to the load balancer (in the form 'ip:1.2.3.4' or 'cidr:1.2.0.0/16')

Deny []stringoptional

the rules for denying traffic to the load balancer (in the form 'ip:1.2.3.4' or 'cidr:1.2.0.0/16')

GlbSettings GlbSettingsoptional

An object specifying forwarding configurations for a Global load balancer.

Cdn GlbSettingsCdnoptional

An object specifying CDN configurations for a Global load balancer.

IsEnabled booloptional

A boolean flag to enable CDN caching.

FailoverThreshold int64optional

An integer value as a percentage to indicate failure threshold to decide how the regional priorities will take effect. A value of 50 would indicate that the Global load balancer will choose a lower priority region to forward traffic to once this failure threshold has been reached for the higher priority region.

RegionPriorities map[string, int64]optional

A map of region string to an integer priority value indicating preference for which regional target a Global load balancer will forward traffic to. A lower value indicates a higher priority.

TargetPort int64optional

An integer representing the port on the target backends which the load balancer will forward traffic to.

TargetProtocol GlbSettingsTargetProtocoloptional

The protocol used for forwarding traffic from the load balancer to the target backends. The possible values are http, https and http2.

Accepts one of the following:
const GlbSettingsTargetProtocolHTTP GlbSettingsTargetProtocol = "http"
const GlbSettingsTargetProtocolHTTPS GlbSettingsTargetProtocol = "https"
const GlbSettingsTargetProtocolHttp2 GlbSettingsTargetProtocol = "http2"
HealthCheck HealthCheckoptional

An object specifying health check settings for the load balancer.

CheckIntervalSeconds int64optional

The number of seconds between between two consecutive health checks.

HealthyThreshold int64optional

The number of times a health check must pass for a backend Droplet to be marked "healthy" and be re-added to the pool.

Path stringoptional

The path on the backend Droplets to which the load balancer instance will send a request.

Port int64optional

An integer representing the port on the backend Droplets on which the health check will attempt a connection.

Protocol HealthCheckProtocoloptional

The protocol used for health checks sent to the backend Droplets. The possible values are http, https, or tcp.

Accepts one of the following:
const HealthCheckProtocolHTTP HealthCheckProtocol = "http"
const HealthCheckProtocolHTTPS HealthCheckProtocol = "https"
const HealthCheckProtocolTcp HealthCheckProtocol = "tcp"
ResponseTimeoutSeconds int64optional

The number of seconds the load balancer instance will wait for a response until marking a health check as failed.

UnhealthyThreshold int64optional

The number of times a health check must fail for a backend Droplet to be marked "unhealthy" and be removed from the pool.

HTTPIdleTimeoutSeconds int64optional

An integer value which configures the idle timeout for HTTP requests to the target droplets.

minimum30
maximum600
IP stringoptional

An attribute containing the public-facing IP address of the load balancer.

Ipv6 stringoptional

An attribute containing the public-facing IPv6 address of the load balancer.

Name stringoptional

A human-readable name for a load balancer instance.

Network LoadBalancerNetworkoptional

A string indicating whether the load balancer should be external or internal. Internal load balancers have no public IPs and are only accessible to resources on the same VPC network. This property cannot be updated after creating the load balancer.

Accepts one of the following:
const LoadBalancerNetworkExternal LoadBalancerNetwork = "EXTERNAL"
const LoadBalancerNetworkInternal LoadBalancerNetwork = "INTERNAL"
NetworkStack LoadBalancerNetworkStackoptional

A string indicating whether the load balancer will support IPv4 or both IPv4 and IPv6 networking. This property cannot be updated after creating the load balancer.

Accepts one of the following:
const LoadBalancerNetworkStackIpv4 LoadBalancerNetworkStack = "IPV4"
const LoadBalancerNetworkStackDualstack LoadBalancerNetworkStack = "DUALSTACK"
ProjectID stringoptional

The ID of the project that the load balancer is associated with. If no ID is provided at creation, the load balancer associates with the user's default project. If an invalid project ID is provided, the load balancer will not be created.

RedirectHTTPToHTTPS booloptional

A boolean value indicating whether HTTP requests to the load balancer on port 80 will be redirected to HTTPS on port 443.

Region Regionoptional

The region where the load balancer instance is located. When setting a region, the value should be the slug identifier for the region. When you query a load balancer, an entire region object will be returned.

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.

DeprecatedSize LoadBalancerSizeoptional

This field has been replaced by the size_unit field for all regions except in AMS2, NYC2, and SFO1. Each available load balancer size now equates to the load balancer having a set number of nodes.

  • lb-small = 1 node
  • lb-medium = 3 nodes
  • lb-large = 6 nodes

You can resize load balancers after creation up to once per hour. You cannot resize a load balancer within the first hour of its creation.

Accepts one of the following:
const LoadBalancerSizeLbSmall LoadBalancerSize = "lb-small"
const LoadBalancerSizeLbMedium LoadBalancerSize = "lb-medium"
const LoadBalancerSizeLbLarge LoadBalancerSize = "lb-large"
SizeUnit int64optional

How many nodes the load balancer contains. Each additional node increases the load balancer's ability to manage more connections. Load balancers can be scaled up or down, and you can change the number of nodes after creation up to once per hour. This field is currently not available in the AMS2, NYC2, or SFO1 regions. Use the size field to scale load balancers that reside in these regions.

minimum1
maximum100
Status LoadBalancerStatusoptional

A status string indicating the current state of the load balancer. This can be new, active, or errored.

Accepts one of the following:
const LoadBalancerStatusNew LoadBalancerStatus = "new"
const LoadBalancerStatusActive LoadBalancerStatus = "active"
const LoadBalancerStatusErrored LoadBalancerStatus = "errored"
StickySessions StickySessionsoptional

An object specifying sticky sessions settings for the load balancer.

Type StickySessionsTypeoptional

An attribute indicating how and if requests from a client will be persistently served by the same backend Droplet. The possible values are cookies or none.

Accepts one of the following:
const StickySessionsTypeCookies StickySessionsType = "cookies"
const StickySessionsTypeNone StickySessionsType = "none"
Tag stringoptional

The name of a Droplet tag corresponding to Droplets assigned to the load balancer.

TargetLoadBalancerIDs []stringoptional

An array containing the UUIDs of the Regional load balancers to be used as target backends for a Global load balancer.

TlsCipherPolicy LoadBalancerTlsCipherPolicyoptional

A string indicating the policy for the TLS cipher suites used by the load balancer. The possible values are DEFAULT or STRONG. The default value is DEFAULT.

Accepts one of the following:
const LoadBalancerTlsCipherPolicyDefault LoadBalancerTlsCipherPolicy = "DEFAULT"
const LoadBalancerTlsCipherPolicyStrong LoadBalancerTlsCipherPolicy = "STRONG"
Type LoadBalancerTypeoptional

A string indicating whether the load balancer should be a standard regional HTTP load balancer, a regional network load balancer that routes traffic at the TCP/UDP transport layer, or a global load balancer.

Accepts one of the following:
const LoadBalancerTypeRegional LoadBalancerType = "REGIONAL"
const LoadBalancerTypeRegionalNetwork LoadBalancerType = "REGIONAL_NETWORK"
const LoadBalancerTypeGlobal LoadBalancerType = "GLOBAL"
VpcUuid stringoptional

A string specifying the UUID of the VPC to which the load balancer is assigned.

formatuuid
type StickySessions struct{…}

An object specifying sticky sessions settings for the load balancer.

Type StickySessionsTypeoptional

An attribute indicating how and if requests from a client will be persistently served by the same backend Droplet. The possible values are cookies or none.

Accepts one of the following:
const StickySessionsTypeCookies StickySessionsType = "cookies"
const StickySessionsTypeNone StickySessionsType = "none"

GPU DropletsLoad BalancersDroplets

Add Droplets to a Load Balancer
client.GPUDroplets.LoadBalancers.Droplets.Add(ctx, lbID, body) error
post/v2/load_balancers/{lb_id}/droplets
Remove Droplets from a Load Balancer
client.GPUDroplets.LoadBalancers.Droplets.Remove(ctx, lbID, body) error
delete/v2/load_balancers/{lb_id}/droplets

GPU DropletsLoad BalancersForwarding Rules

Add Forwarding Rules to a Load Balancer
client.GPUDroplets.LoadBalancers.ForwardingRules.Add(ctx, lbID, body) error
post/v2/load_balancers/{lb_id}/forwarding_rules
Remove Forwarding Rules from a Load Balancer
client.GPUDroplets.LoadBalancers.ForwardingRules.Remove(ctx, lbID, body) error
delete/v2/load_balancers/{lb_id}/forwarding_rules

GPU DropletsSizes

List All Droplet Sizes
client.GPUDroplets.Sizes.List(ctx, query) (*GPUDropletSizeListResponse, error)
get/v2/sizes

GPU DropletsSnapshots

List All Snapshots
client.GPUDroplets.Snapshots.List(ctx, query) (*GPUDropletSnapshotListResponse, error)
get/v2/snapshots
Retrieve an Existing Snapshot
client.GPUDroplets.Snapshots.Get(ctx, snapshotID) (*GPUDropletSnapshotGetResponse, error)
get/v2/snapshots/{snapshot_id}
Delete a Snapshot
client.GPUDroplets.Snapshots.Delete(ctx, snapshotID) error
delete/v2/snapshots/{snapshot_id}

GPU DropletsVolumes

List All Block Storage Volumes
client.GPUDroplets.Volumes.List(ctx, query) (*GPUDropletVolumeListResponse, error)
get/v2/volumes
Create a New Block Storage Volume
client.GPUDroplets.Volumes.New(ctx, body) (*GPUDropletVolumeNewResponse, error)
post/v2/volumes
Delete a Block Storage Volume by Name
client.GPUDroplets.Volumes.DeleteByName(ctx, body) error
delete/v2/volumes
Retrieve an Existing Block Storage Volume
client.GPUDroplets.Volumes.Get(ctx, volumeID) (*GPUDropletVolumeGetResponse, error)
get/v2/volumes/{volume_id}
Delete a Block Storage Volume
client.GPUDroplets.Volumes.Delete(ctx, volumeID) error
delete/v2/volumes/{volume_id}

GPU DropletsVolumesActions

Initiate A Block Storage Action By Volume Name
client.GPUDroplets.Volumes.Actions.InitiateByName(ctx, params) (*GPUDropletVolumeActionInitiateByNameResponse, error)
post/v2/volumes/actions
List All Actions for a Volume
client.GPUDroplets.Volumes.Actions.List(ctx, volumeID, query) (*GPUDropletVolumeActionListResponse, error)
get/v2/volumes/{volume_id}/actions
Initiate A Block Storage Action By Volume Id
client.GPUDroplets.Volumes.Actions.InitiateByID(ctx, volumeID, params) (*GPUDropletVolumeActionInitiateByIDResponse, error)
post/v2/volumes/{volume_id}/actions
Retrieve an Existing Volume Action
client.GPUDroplets.Volumes.Actions.Get(ctx, volumeID, actionID, query) (*GPUDropletVolumeActionGetResponse, error)
get/v2/volumes/{volume_id}/actions/{action_id}
ModelsExpand Collapse
type VolumeAction struct{…}
ResourceID int64optional
Type stringoptional

This is the type of action that the object represents. For example, this could be "attach_volume" to represent the state of a volume attach action.

GPU DropletsVolumesSnapshots

Retrieve an Existing Volume Snapshot
client.GPUDroplets.Volumes.Snapshots.Get(ctx, snapshotID) (*GPUDropletVolumeSnapshotGetResponse, error)
get/v2/volumes/snapshots/{snapshot_id}
Delete a Volume Snapshot
client.GPUDroplets.Volumes.Snapshots.Delete(ctx, snapshotID) error
delete/v2/volumes/snapshots/{snapshot_id}
List Snapshots for a Volume
client.GPUDroplets.Volumes.Snapshots.List(ctx, volumeID, query) (*GPUDropletVolumeSnapshotListResponse, error)
get/v2/volumes/{volume_id}/snapshots
Create Snapshot from a Volume
client.GPUDroplets.Volumes.Snapshots.New(ctx, volumeID, body) (*GPUDropletVolumeSnapshotNewResponse, error)
post/v2/volumes/{volume_id}/snapshots

GPU DropletsAccount

GPU DropletsAccountKeys

List All SSH Keys
client.GPUDroplets.Account.Keys.List(ctx, query) (*GPUDropletAccountKeyListResponse, error)
get/v2/account/keys
Create a New SSH Key
client.GPUDroplets.Account.Keys.New(ctx, body) (*GPUDropletAccountKeyNewResponse, error)
post/v2/account/keys
Retrieve an Existing SSH Key
client.GPUDroplets.Account.Keys.Get(ctx, sshKeyIdentifier) (*GPUDropletAccountKeyGetResponse, error)
get/v2/account/keys/{ssh_key_identifier}
Update an SSH Key's Name
client.GPUDroplets.Account.Keys.Update(ctx, sshKeyIdentifier, body) (*GPUDropletAccountKeyUpdateResponse, error)
put/v2/account/keys/{ssh_key_identifier}
Delete an SSH Key
client.GPUDroplets.Account.Keys.Delete(ctx, sshKeyIdentifier) error
delete/v2/account/keys/{ssh_key_identifier}
ModelsExpand Collapse
type SSHKeys struct{…}
Name string

A human-readable display name for this key, used to easily identify the SSH keys when they are displayed.

PublicKey string

The entire public key string that was uploaded. Embedded into the root user's authorized_keys file if you include this key during Droplet creation.

ID int64optional

A unique identification number for this key. Can be used to embed a specific SSH key into a Droplet.

Fingerprint stringoptional

A unique identifier that differentiates this key from other keys using a format that SSH recognizes. The fingerprint is created when the key is added to your account.