Skip to content
  • Auto
  • Light
  • Dark

List Policies

List Backup Policies for All Existing Droplets
gpu_droplets.backups.list_policies(BackupListPoliciesParams**kwargs) -> metaMetaPropertieslinksPageLinkspoliciesDict[str, Policies]BackupListPoliciesResponse
get/v2/droplets/backups/policies

To list information about the backup policies for all Droplets in the account, send a GET request to /v2/droplets/backups/policies.

Parameters
pageint
optional

Which 'page' of paginated results to return.

minimum1
per_pageint
optional

Number of items returned per page

minimum1
maximum200
Returns
BackupListPoliciesResponseclass
Hide ParametersShow Parameters
metatotalintMetaProperties

Information about the response itself.

policiesDict[str, Policies]
optional
Optional[Dict[str, Policies]]

A map where the keys are the Droplet IDs and the values are objects containing the backup policy information for each Droplet.

Hide ParametersShow Parameters
backup_enabledbool
optional

A boolean value indicating whether backups are enabled for the Droplet.

backup_policyDropletBackupPolicy
optional

An object specifying the backup policy for the Droplet.

droplet_idint
optional

The unique identifier for the Droplet.

next_backup_windowDropletNextBackupWindow
optional

An object containing keys with the start and end times of the window during which the backup will occur.

from do_gradientai import GradientAI

client = GradientAI()
response = client.gpu_droplets.backups.list_policies()
print(response.meta)
200 Example
{
  "meta": {
    "total": 1
  },
  "links": {
    "pages": {
      "last": "https://api.digitalocean.com/v2/images?page=2",
      "next": "https://api.digitalocean.com/v2/images?page=2"
    }
  },
  "policies": {
    "foo": {
      "backup_enabled": true,
      "backup_policy": {
        "hour": 0,
        "plan": "daily",
        "weekday": "SUN"
      },
      "droplet_id": 7101383,
      "next_backup_window": {
        "end": "2019-12-04T23:00:00Z",
        "start": "2019-12-04T00:00:00Z"
      }
    }
  }
}