List NFS shares per region
client.nfs.list(NfListParams { region } query, RequestOptionsoptions?): NfListResponse { shares }
/v2/nfs
To list NFS shares, send a GET request to /v2/nfs?region=${region}.
A successful request will return all NFS shares belonging to the authenticated user.
Parameters
Returns
List NFS shares per region
import Gradient from '@digitalocean/gradient';
const client = new Gradient({
accessToken: 'My Access Token',
});
const nfs = await client.nfs.list({ region: 'region' });
console.log(nfs.shares);
{
"shares": [
{
"id": "0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
"created_at": "2023-01-01T00:00:00Z",
"name": "sammy-share-drive",
"region": "atl1",
"size_gib": 1024,
"status": "ACTIVE",
"host": "10.128.32.2",
"mount_path": "/123456/your-nfs-share-uuid",
"vpc_ids": [
"796c6fe3-2a1d-4da2-9f3e-38239827dc91"
]
}
]
}Returns Examples
{
"shares": [
{
"id": "0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
"created_at": "2023-01-01T00:00:00Z",
"name": "sammy-share-drive",
"region": "atl1",
"size_gib": 1024,
"status": "ACTIVE",
"host": "10.128.32.2",
"mount_path": "/123456/your-nfs-share-uuid",
"vpc_ids": [
"796c6fe3-2a1d-4da2-9f3e-38239827dc91"
]
}
]
}