Skip to content

Get an NFS share

nfs.retrieve(strnfs_id, NfRetrieveParams**kwargs) -> NfRetrieveResponse
get/v2/nfs/{nfs_id}

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

A successful request will return the NFS share.

ParametersExpand Collapse
nfs_id: str
region: str

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

ReturnsExpand Collapse
class NfRetrieveResponse:
share: Optional[Share]
id: str

The unique identifier of the NFS share.

created_at: datetime

Timestamp for when the NFS share was created.

formatdate-time
name: str

The human-readable name of the share.

region: str

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

size_gib: int

The desired/provisioned size of the share in GiB (Gibibytes). Must be >= 50.

status: Literal["CREATING", "ACTIVE", "FAILED", "DELETED"]

The current status of the share.

Accepts one of the following:
"CREATING"
"ACTIVE"
"FAILED"
"DELETED"
host: Optional[str]

The host IP of the NFS server that will be accessible from the associated VPC

mount_path: Optional[str]

Path at which the share will be available, to be mounted at a target of the user's choice within the client

vpc_ids: Optional[List[str]]

List of VPC IDs that should be able to access the share.

Get an NFS share
from gradient import Gradient

client = Gradient(
    access_token="My Access Token",
)
nf = client.nfs.retrieve(
    nfs_id="0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
    region="region",
)
print(nf.share)
{
  "share": {
    "id": "0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
    "name": "sammy-share-drive",
    "size_gib": 1024,
    "region": "atl1",
    "status": "ACTIVE",
    "created_at": "2023-01-01T00:00:00Z",
    "vpc_ids": [
      "796c6fe3-2a1d-4da2-9f3e-38239827dc91"
    ],
    "mount_path": "/123456/your-nfs-share-uuid",
    "host": "10.128.32.2"
  }
}
Returns Examples
{
  "share": {
    "id": "0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
    "name": "sammy-share-drive",
    "size_gib": 1024,
    "region": "atl1",
    "status": "ACTIVE",
    "created_at": "2023-01-01T00:00:00Z",
    "vpc_ids": [
      "796c6fe3-2a1d-4da2-9f3e-38239827dc91"
    ],
    "mount_path": "/123456/your-nfs-share-uuid",
    "host": "10.128.32.2"
  }
}