Skip to main content

droplet_backup_policies

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

Overview

Namedroplet_backup_policies
TypeResource
Iddigitalocean.compute.droplet_backup_policies

Fields

The following fields are returned by SELECT queries:

The response will be a JSON object with a key called policy. This will be
set to a JSON object that contains the standard Droplet backup policy attributes.

NameDatatypeDescription
droplet_idintegerThe unique identifier for the Droplet.
backup_enabledbooleanA boolean value indicating whether backups are enabled for the Droplet.
backup_policyobjectAn object specifying the backup policy for the Droplet.
next_backup_windowobjectAn object containing keys with the start and end times of the window during which the backup will occur.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
droplets_get_backup_policyselectdroplet_idTo show information about an individual Droplet's backup policy, send a GET
request to /v2/droplets/$DROPLET_ID/backups/policy.
droplets_list_backup_policiesselectper_page, pageTo list information about the backup policies for all Droplets in the account,
send a GET request to /v2/droplets/backups/policies.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
droplet_idintegerA unique identifier for a Droplet instance. (example: 3164444)
pageintegerWhich 'page' of paginated results to return. (example: 1)
per_pageintegerNumber of items returned per page (example: 2)

SELECT examples

To show information about an individual Droplet's backup policy, send a GET
request to /v2/droplets/$DROPLET_ID/backups/policy.

SELECT
droplet_id,
backup_enabled,
backup_policy,
next_backup_window
FROM digitalocean.compute.droplet_backup_policies
WHERE droplet_id = '{{ droplet_id }}' -- required;