Skip to main content

snapshots

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

Overview

Namesnapshots
TypeResource
Iddigitalocean.droplets.snapshots

Fields

NameDatatypeDescription
idintegerThe unique identifier for the snapshot or backup.
namestringA human-readable name for the snapshot.
created_atstringA time value given in ISO8601 combined date and time format that represents when the snapshot was created.
min_disk_sizeintegerThe minimum size in GB required for a volume or Droplet to use this snapshot.
regionsarrayAn array of the regions that the snapshot is available in. The regions are represented by their identifying slug values.
size_gigabytesnumberThe billable size of the snapshot in gigabytes.
typestringDescribes the kind of image. It may be one of snapshot or backup. This specifies whether an image is a user-generated Droplet snapshot or automatically created Droplet backup.

Methods

NameAccessible byRequired ParamsDescription
droplets_list_snapshotsSELECTdroplet_idTo retrieve the snapshots that have been created from a Droplet, send a GET request to /v2/droplets/$DROPLET_ID/snapshots. You will get back a JSON object that has a snapshots key. This will be set to an array of snapshot objects, each of which contain the standard Droplet snapshot attributes.

SELECT examples

To retrieve the snapshots that have been created from a Droplet, send a GET request to /v2/droplets/$DROPLET_ID/snapshots. You will get back a JSON object that has a snapshots key. This will be set to an array of snapshot objects, each of which contain the standard Droplet snapshot attributes.

SELECT
id,
name,
created_at,
min_disk_size,
regions,
size_gigabytes,
type
FROM digitalocean.droplets.snapshots
WHERE droplet_id = '{{ droplet_id }}';