Create
Create Snapshot from a Volume
gpu_droplets.volumes.snapshots.create(strvolume_id, SnapshotCreateParams**kwargs) -> snapshotSnapshotsSnapshotCreateResponse
post/v2/volumes/{volume_id}/snapshots
To create a snapshot from a volume, sent a POST request to /v2/volumes/$VOLUME_ID/snapshots
.
Parameters
volume_idstr
formatuuid
namestr
A human-readable name for the volume snapshot.
Returns
SnapshotCreateResponseclass
from do_gradientai import GradientAI
client = GradientAI()
snapshot = client.gpu_droplets.volumes.snapshots.create(
volume_id="7724db7c-e098-11e5-b522-000f53304e51",
name="big-data-snapshot1475261774",
)
print(snapshot.snapshot)
200 Example
{
"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"
]
}
}