Skip to main content

neighbors

Creates, updates, deletes, gets or lists a neighbors resource.

Overview

Nameneighbors
TypeResource
Iddigitalocean.droplets.neighbors

Fields

NameDatatypeDescription
idintegerA unique identifier for each Droplet instance. This is automatically generated upon Droplet creation.
namestringThe human-readable name set for the Droplet instance.
backup_idsarrayAn 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.
created_atstringA time value given in ISO8601 combined date and time format that represents when the Droplet was created.
diskintegerThe size of the Droplet's disk in gigabytes.
disk_infoarrayAn array of objects containing information about the disks available to the Droplet.
featuresarrayAn array of features enabled on this Droplet.
gpu_infoobjectAn object containing information about the GPU capabilities of Droplets created with this size.
imageobject
kernelobjectNote: 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.
lockedbooleanA boolean value indicating whether the Droplet has been locked, preventing actions by users.
memoryintegerMemory of the Droplet in megabytes.
networksobjectThe 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.
next_backup_windowobjectThe 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.
regionobject
sizeobject
size_slugstringThe unique slug identifier for the size of this Droplet.
snapshot_idsarrayAn array of snapshot IDs of any snapshots created from the Droplet instance.
statusstringA status string indicating the state of the Droplet instance. This may be "new", "active", "off", or "archive".
tagsarrayAn array of Tags the Droplet has been tagged with.
vcpusintegerThe number of virtual CPUs.
volume_idsarrayA flat array including the unique identifier for each Block Storage volume attached to the Droplet.
vpc_uuidstringA string specifying the UUID of the VPC to which the Droplet is assigned.

Methods

NameAccessible byRequired ParamsDescription
droplets_list_neighborsSELECTdroplet_idTo retrieve a list of any "neighbors" (i.e. Droplets that are co-located on the same physical hardware) for a specific Droplet, send a GET request to /v2/droplets/$DROPLET_ID/neighbors. The results will be returned as a JSON object with a key of droplets. This will be set to an array containing objects representing any other Droplets that share the same physical hardware. An empty array indicates that the Droplet is not co-located any other Droplets associated with your account.

SELECT examples

To retrieve a list of any "neighbors" (i.e. Droplets that are co-located on the same physical hardware) for a specific Droplet, send a GET request to /v2/droplets/$DROPLET_ID/neighbors. The results will be returned as a JSON object with a key of droplets. This will be set to an array containing objects representing any other Droplets that share the same physical hardware. An empty array indicates that the Droplet is not co-located any other Droplets associated with your account.

SELECT
id,
name,
backup_ids,
created_at,
disk,
disk_info,
features,
gpu_info,
image,
kernel,
locked,
memory,
networks,
next_backup_window,
region,
size,
size_slug,
snapshot_ids,
status,
tags,
vcpus,
volume_ids,
vpc_uuid
FROM digitalocean.droplets.neighbors
WHERE droplet_id = '{{ droplet_id }}';