pydo.volumes.create()
Generated on 3 Aug 2026
from pydo version
v0.40.0
Usage
client.volumes.create(
body={
"name": "example",
"description": "Block store for examples",
"size_gigabytes": 10,
...,
},
)Description
To create a new volume, send a POST request to /v2/volumes. Optionally, a filesystem_type attribute may be provided in order to automatically format the volume’s filesystem. Pre-formatted volumes are automatically mounted when attached to Ubuntu, Debian, Fedora, Fedora Atomic, and CentOS Droplets created on or after April 26, 2018. Attaching pre-formatted volumes to Droplets without support for auto-mounting is not recommended.
Parameters
idstring optional read-onlyExample:
506f78a4-e098-11e5-ad9f-000f53306ae1The unique identifier for the block storage volume.
droplet_idsarray of integers or null optional read-onlyExample:
[]An array containing the IDs of the Droplets the volume is attached to. Note that at this time, a volume can only be attached to a single Droplet.
namestring requiredExample:
exampleA human-readable name for the block storage volume. Must be lowercase and be composed only of numbers, letters and "-", up to a limit of 64 characters. The name must begin with a letter.
descriptionstring optionalExample:
Block store for examplesAn optional free-form text field to describe a block storage volume.
size_gigabytesinteger requiredExample:
10The size of the block storage volume in GiB (1024^3). This field does not apply when creating a volume from a snapshot.
created_atstring optional read-onlyExample:
2020-03-02T17:00:49ZA time value given in ISO8601 combined date and time format that represents when the block storage volume was created.
tagsarray of strings or null optionalExample:
['base-image', 'prod']A flat array of tag names as strings to be applied to the resource. Tag names may be for either existing or new tags.
Requirestag:createscope.snapshot_idstring optionalExample:
b0798135-fb76-11eb-946a-0a58ac146f33The unique identifier for the volume snapshot from which to create the volume.
filesystem_typestring optionalExample:
ext4The name of the filesystem type to be used on the volume. When provided, the volume will automatically be formatted to the specified filesystem type. Currently, the available options are
ext4andxfs. Pre-formatted volumes are automatically mounted when attached to Ubuntu, Debian, Fedora, Fedora Atomic, and CentOS Droplets created on or after April 26, 2018. Attaching pre-formatted volumes to other Droplets is not recommended.regionstring requiredThe slug identifier for the region where the resource will initially be available.
filesystem_labelobject optional
Request Sample
Response Example
More Information
See /v2/volumes in the API reference for additional detail on responses, headers, parameters, and more.