Skip to content
  • Auto
  • Light
  • Dark

Retrieve Policy

Retrieve the Backup Policy for an Existing Droplet
gpu_droplets.backups.retrieve_policy(intdroplet_id) -> policyPolicyBackupRetrievePolicyResponse
get/v2/droplets/{droplet_id}/backups/policy

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

Parameters
droplet_idint
minimum1
Returns
BackupRetrievePolicyResponseclass
Hide ParametersShow Parameters
policybackup_enabledboolbackup_policyDropletBackupPolicydroplet_idintnext_backup_windowDropletNextBackupWindowPolicy
optional
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.retrieve_policy(
    1,
)
print(response.policy)
200 Example
{
  "policy": {
    "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"
    }
  }
}