dots.v2.nfs.post()

Generated on 27 Oct 2026 from DoTs version v1.21.0

Usage

client.v2.nfs.post(body: Nfs_request, requestConfiguration?: RequestConfiguration<object>): Promise<undefined | Nfs_create_response>

Description

To create a new NFS share, send a POST request to /v2/nfs.

Parameters

name string required

Example: my-nfs-share

The human-readable name of the share.

sizeGib integer required

Example: 50

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

region string required

Example: atl1

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

vpcIds array of strings required

Example: ["796c6fe3-2a1d-4da2-9f3e-38239827dc91"]

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

performanceTier string optional

Example: standard

The performance tier of the share.

Request Sample

Show Request Sample
import { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary";
import {
    createDigitalOceanClient,
    DigitalOceanApiKeyAuthenticationProvider,
} from "@digitalocean/dots";

const authProvider = new DigitalOceanApiKeyAuthenticationProvider(process.env.DIGITALOCEAN_TOKEN!);
const adapter = new FetchRequestAdapter(authProvider);
const client = createDigitalOceanClient(adapter);

const response = await client.v2.nfs.post({
    name: "sammy-share-drive",
    sizeGib: 1024,
    region: "atl1",
    vpcIds: [
        "796c6fe3-2a1d-4da2-9f3e-38239827dc91",
    ],
    performanceTier: "standard",
});

Response Example

Show Response Example
{
  "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"
    ],
    "performance_tier": "PERFORMANCE_TIER_HIGH",
    "mount_path": "/123456/your-nfs-share-uuid",
    "host": "10.128.32.2",
    "access_points": []
  }
}

More Information

See /v2/nfs in the API reference for 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.