Skip to content
  • Auto
  • Light
  • Dark

List Supported Policies

List Supported Droplet Backup Policies
client.gpuDroplets.backups.listSupportedPolicies(RequestOptionsoptions?): BackupListSupportedPoliciesResponse { supported_policies }
get/v2/droplets/backups/supported_policies

To retrieve a list of all supported Droplet backup policies, send a GET request to /v2/droplets/backups/supported_policies.

ReturnsExpand Collapse
BackupListSupportedPoliciesResponse { supported_policies }
supported_policies?: Array<SupportedPolicy>
name?: string

The name of the Droplet backup plan.

possible_days?: Array<string>

The day of the week the backup will occur.

possible_window_starts?: Array<number>

An array of integers representing the hours of the day that a backup can start.

retention_period_days?: number

The number of days that a backup will be kept.

window_length_hours?: number

The number of hours that a backup window is open.

List Supported Droplet Backup Policies
import Gradient from '@digitalocean/gradient';

const client = new Gradient();

const response = await client.gpuDroplets.backups.listSupportedPolicies();

console.log(response.supported_policies);
{
  "supported_policies": [
    {
      "name": "daily",
      "possible_days": [
        "SUN",
        "MON",
        "TUE",
        "WED",
        "THU",
        "FRI",
        "SAT"
      ],
      "possible_window_starts": [
        0,
        4,
        8,
        12,
        16,
        20
      ],
      "retention_period_days": 7,
      "window_length_hours": 4
    }
  ]
}
Returns Examples
{
  "supported_policies": [
    {
      "name": "daily",
      "possible_days": [
        "SUN",
        "MON",
        "TUE",
        "WED",
        "THU",
        "FRI",
        "SAT"
      ],
      "possible_window_starts": [
        0,
        4,
        8,
        12,
        16,
        20
      ],
      "retention_period_days": 7,
      "window_length_hours": 4
    }
  ]
}