For AI agents: The documentation index is at https://docs.digitalocean.com/llms.txt. Markdown versions of pages use the same URL with index.html.md in place of the HTML page (for example, append index.html.md to the directory path instead of opening the HTML document).
Usage
client.droplets.get_backup_policy(droplet_id=3164444)
Returns JSONRaises HttpResponseError
Description
To show information about an individual Droplet’s backup policy, send a GET
request to /v2/droplets/{droplet_id}/backups/policy.
Parameters
droplet_id integer required
A unique identifier for a Droplet instance.
Min: 1
Request Sample
Show Request Sample
import os
from pydo import Client
client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))
resp = client.droplets.get_backup_policy(droplet_id=444909706)
Response Example
Show Response Example
{
"policy": {
"droplet_id": 444909706,
"backup_enabled": true,
"backup_policy": {
"plan": "weekly",
"weekday": "SUN",
"hour": 20,
"window_length_hours": 4,
"retention_period_days": 28
},
"next_backup_window": {
"start": "2024-09-15T20:00:00Z",
"end": "2024-09-16T00:00:00Z"
}
}
}
See /v2/droplets/{droplet_id}/backups/policy in the API reference for additional detail on responses, headers, parameters, and more.