pydo.volumes.list()

Generated on 17 Apr 2025 from pydo version v0.10.0

Description

To list all of the block storage volumes available on your account, send a GET request to /v2/volumes.

Filtering Results

By Region

The region may be provided as query parameter in order to restrict results to volumes available in a specific region. For example: /v2/volumes?region=nyc1

By Name

It is also possible to list volumes on your account that match a specified name. To do so, send a GET request with the volume’s name as a query parameter to /v2/volumes?name=$VOLUME_NAME. Note: You can only create one volume per region with the same name.

By Name and Region

It is also possible to retrieve information about a block storage volume by name. To do so, send a GET request with the volume’s name and the region slug for the region it is located in as query parameters to /v2/volumes?name=$VOLUME_NAME&region=nyc1.

Parameters

Name Type Required Description Default Value
name string False The block storage volume’s name.
region string False The slug identifier for the region where the resource is available.
per_page integer False Number of items returned per page 20
page integer False Which ‘page’ of paginated results to return. 1

Request Sample

import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

resp = client.volumes.list(region="nyc3")

More Information

See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.