pydo.volume_snapshots.create()
Generated on 13 Jan 2026
from pydo version
v0.24.0
Description
To create a snapshot from a volume, sent a POST request to /v2/volumes/$VOLUME_ID/snapshots.
Parameters
| Name | Type | Required | Description | Default Value |
|---|---|---|---|---|
volume_id |
string | True | The ID of the block storage volume. | |
body |
JSON or IO[bytes] | True |
Request Sample
import os
from pydo import Client
client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))
req = {
"name": "big-data-snapshot1475261774"
}
resp = client.volume_snapshots.create(volume_id="da3aa3a", body=req)More Information
See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.