To list the associated billable resources that can be destroyed along with a
Droplet, send a GET request to the
/v2/droplets/$DROPLET_ID/destroy_with_associated_resources
endpoint.
The response will be a JSON object containing snapshots
, volumes
, and
volume_snapshots
keys. Each will be set to an array of objects containing
information about the associated resources.
Name | Type | Required | Description | Default Value |
---|---|---|---|---|
droplet_id |
integer | True | A unique identifier for a Droplet instance. |
import os
from pydo import Client
client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))
resp = client.droplets.list_associated_resources(droplet_id=594828)
See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.