Skip to content
  • Auto
  • Light
  • Dark

List Supported Policies

List Supported Droplet Backup Policies
gpu_droplets.backups.list_supported_policies() -> supported_policieslistBackupListSupportedPoliciesResponse
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.

Returns
BackupListSupportedPoliciesResponseclass
Hide ParametersShow Parameters
supported_policieslist
optional
Optional[List[SupportedPolicy]]
Hide ParametersShow Parameters
namestr
optional

The name of the Droplet backup plan.

possible_dayslist
optional
Optional[List[str]]

The day of the week the backup will occur.

possible_window_startslist
optional
Optional[List[int]]

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

retention_period_daysint
optional

The number of days that a backup will be kept.

window_length_hoursint
optional

The number of hours that a backup window is open.

from do_gradientai import GradientAI

client = GradientAI()
response = client.gpu_droplets.backups.list_supported_policies()
print(response.supported_policies)
200 Example
{
  "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
    }
  ]
}