Skip to content

Get an NFS snapshot by ID

client.nfs.snapshots.retrieve(stringnfsSnapshotID, SnapshotRetrieveParams { region } query, RequestOptionsoptions?): SnapshotRetrieveResponse { snapshot }
get/v2/nfs/snapshots/{nfs_snapshot_id}

To get an NFS snapshot, send a GET request to /v2/nfs/snapshots/{nfs_snapshot_id}?region=${region}.

A successful request will return the NFS snapshot.

ParametersExpand Collapse
nfsSnapshotID: string
query: SnapshotRetrieveParams { region }
region: string

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

ReturnsExpand Collapse
SnapshotRetrieveResponse { snapshot }
snapshot?: Snapshot { id, created_at, name, 4 more }

Represents an NFS snapshot.

id: string

The unique identifier of the snapshot.

created_at: string

The timestamp when the snapshot was created.

formatdate-time
name: string

The human-readable name of the snapshot.

region: string

The DigitalOcean region slug where the snapshot is located.

share_id: string

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

formatuuid
size_gib: number

The size of the snapshot in GiB.

formatuint64
status: "UNKNOWN" | "CREATING" | "ACTIVE" | 2 more

The current status of the snapshot.

Accepts one of the following:
"UNKNOWN"
"CREATING"
"ACTIVE"
"FAILED"
"DELETED"
Get an NFS snapshot by ID
import Gradient from '@digitalocean/gradient';

const client = new Gradient({
  accessToken: 'My Access Token',
});

const snapshot = await client.nfs.snapshots.retrieve('0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d', {
  region: 'region',
});

console.log(snapshot.snapshot);
{
  "snapshot": {
    "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
{
  "snapshot": {
    "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"
  }
}