List
List Snapshots for a Volume
gpu_droplets.volumes.snapshots.list(strvolume_id, SnapshotListParams**kwargs) -> SnapshotListResponse
/v2/volumes/{volume_id}/snapshots
To retrieve the snapshots that have been created from a volume, send a GET request to /v2/volumes/$VOLUME_ID/snapshots
.
Parameters
volume_id: str
Returns
List Snapshots for a Volume
from gradient import Gradient
client = Gradient()
snapshots = client.gpu_droplets.volumes.snapshots.list(
volume_id="7724db7c-e098-11e5-b522-000f53304e51",
)
print(snapshots.meta)
{
"meta": {
"total": 1
},
"links": {
"pages": {
"last": "https://api.digitalocean.com/v2/images?page=2",
"next": "https://api.digitalocean.com/v2/images?page=2"
}
},
"snapshots": [
{
"id": "8eb4d51a-873f-11e6-96bf-000f53315a41",
"created_at": "2020-09-30T18:56:12Z",
"min_disk_size": 10,
"name": "big-data-snapshot1475261752",
"regions": [
"nyc1"
],
"resource_id": "82a48a18-873f-11e6-96bf-000f53315a41",
"resource_type": "volume",
"size_gigabytes": 0,
"tags": [
"string"
]
}
]
}
Returns Examples
{
"meta": {
"total": 1
},
"links": {
"pages": {
"last": "https://api.digitalocean.com/v2/images?page=2",
"next": "https://api.digitalocean.com/v2/images?page=2"
}
},
"snapshots": [
{
"id": "8eb4d51a-873f-11e6-96bf-000f53315a41",
"created_at": "2020-09-30T18:56:12Z",
"min_disk_size": 10,
"name": "big-data-snapshot1475261752",
"regions": [
"nyc1"
],
"resource_id": "82a48a18-873f-11e6-96bf-000f53315a41",
"resource_type": "volume",
"size_gigabytes": 0,
"tags": [
"string"
]
}
]
}