Skip to content
  • Auto
  • Light
  • Dark

Retrieve

Retrieve an Existing Volume Snapshot
gpu_droplets.volumes.snapshots.retrieve(strsnapshot_id) -> SnapshotRetrieveResponse
get/v2/volumes/snapshots/{snapshot_id}

To retrieve the details of a snapshot that has been created from a volume, send a GET request to /v2/volumes/snapshots/$VOLUME_SNAPSHOT_ID.

ParametersExpand Collapse
snapshot_id: str
ReturnsExpand Collapse
class SnapshotRetrieveResponse:
snapshot: Optional[Snapshots]
id: str

The unique identifier for the snapshot.

created_at: datetime

A time value given in ISO8601 combined date and time format that represents when the snapshot was created.

formatdate-time
min_disk_size: int

The minimum size in GB required for a volume or Droplet to use this snapshot.

name: str

A human-readable name for the snapshot.

regions: List[str]

An array of the regions that the snapshot is available in. The regions are represented by their identifying slug values.

resource_id: str

The unique identifier for the resource that the snapshot originated from.

resource_type: Literal["droplet", "volume"]

The type of resource that the snapshot originated from.

Accepts one of the following:
"droplet"
"volume"
size_gigabytes: float

The billable size of the snapshot in gigabytes.

formatfloat
tags: Optional[List[str]]

An array of Tags the snapshot has been tagged with.

Requires tag:read scope.

Retrieve an Existing Volume Snapshot
from gradient import Gradient

client = Gradient(
    access_token="My Access Token",
)
snapshot = client.gpu_droplets.volumes.snapshots.retrieve(
    "fbe805e8-866b-11e6-96bf-000f53315a41",
)
print(snapshot.snapshot)
{
  "snapshot": {
    "id": "8fa70202-873f-11e6-8b68-000f533176b1",
    "created_at": "2020-09-30T18:56:14Z",
    "min_disk_size": 10,
    "name": "big-data-snapshot1475261774",
    "regions": [
      "nyc1"
    ],
    "resource_id": "82a48a18-873f-11e6-96bf-000f53315a41",
    "resource_type": "volume",
    "size_gigabytes": 10,
    "tags": [
      "aninterestingtag"
    ]
  }
}
Returns Examples
{
  "snapshot": {
    "id": "8fa70202-873f-11e6-8b68-000f533176b1",
    "created_at": "2020-09-30T18:56:14Z",
    "min_disk_size": 10,
    "name": "big-data-snapshot1475261774",
    "regions": [
      "nyc1"
    ],
    "resource_id": "82a48a18-873f-11e6-96bf-000f53315a41",
    "resource_type": "volume",
    "size_gigabytes": 10,
    "tags": [
      "aninterestingtag"
    ]
  }
}