Skip to content

List NFS snapshots per region

nfs.snapshots.list(SnapshotListParams**kwargs) -> SnapshotListResponse
get/v2/nfs/snapshots

To list all NFS snapshots, send a GET request to /v2/nfs/snapshots?region=${region}&share_id={share_id}.

A successful request will return all NFS snapshots belonging to the authenticated user in the specified region.

Optionally, you can filter snapshots by a specific NFS share by including the share_id query parameter.

ParametersExpand Collapse
region: str

The DigitalOcean region slug (e.g., nyc2, atl1) where the NFS share resides.

share_id: Optional[str]

The unique ID of an NFS share. If provided, only snapshots of this specific share will be returned.

ReturnsExpand Collapse
class SnapshotListResponse:
snapshots: Optional[List[Snapshot]]
id: str

The unique identifier of the snapshot.

created_at: datetime

The timestamp when the snapshot was created.

formatdate-time
name: str

The human-readable name of the snapshot.

region: str

The DigitalOcean region slug where the snapshot is located.

share_id: str

The unique identifier of the share from which this snapshot was created.

formatuuid
size_gib: int

The size of the snapshot in GiB.

formatuint64
status: Literal["UNKNOWN", "CREATING", "ACTIVE", 2 more]

The current status of the snapshot.

Accepts one of the following:
"UNKNOWN"
"CREATING"
"ACTIVE"
"FAILED"
"DELETED"
List NFS snapshots per region
from gradient import Gradient

client = Gradient(
    access_token="My Access Token",
)
snapshots = client.nfs.snapshots.list(
    region="region",
)
print(snapshots.snapshots)
{
  "snapshots": [
    {
      "id": "0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
      "created_at": "2023-11-14T16:29:21Z",
      "name": "daily-backup",
      "region": "atl1",
      "share_id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
      "size_gib": 1024,
      "status": "CREATING"
    }
  ]
}
Returns Examples
{
  "snapshots": [
    {
      "id": "0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
      "created_at": "2023-11-14T16:29:21Z",
      "name": "daily-backup",
      "region": "atl1",
      "share_id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
      "size_gib": 1024,
      "status": "CREATING"
    }
  ]
}