dots.v2.nfs.byNfs_id().actions.post()

Generated on 13 Nov 2026 from DoTs version v1.24.0

Usage

client.v2.nfs.byNfs_id(nfs_id).actions.post(body: Nfs_action_attach | Nfs_action_detach | Nfs_action_reassign | Nfs_action_resize | Nfs_action_snapshot | Nfs_action_switch_performance_tier, requestConfiguration?: RequestConfiguration<object>): Promise<undefined | Nfs_actions_response>

Description

To execute an action (such as resize) on a specified NFS share, send a POST request to /v2/nfs/{nfs_id}/actions. In the JSON body to the request, set the type attribute to on of the supported action types:

Action Details
resize Resizes an NFS share. Set the size_gib attribute to a desired value in GiB
snapshot Takes a snapshot of an NFS share
attach Attaches an NFS share to a VPC. Set the vpc_id attribute to the desired VPC ID
detach Detaches an NFS share from a VPC. Set the vpc_id attribute to the desired VPC ID
reassign Reassigns an NFS share from one VPC to another. Set the old_vpc_id and new_vpc_id attributes to the desired VPC IDs
switch_performance_tier Switches the performance tier of an NFS share. Set the performance_tier attribute to the desired tier (e.g., standard, high)

Parameters

Path Parameters

nfs_id string required

Example: 0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d

The unique ID of the NFS share

Request Body

nfs_action_resize

type string required

The type of action to initiate for the NFS share (such as resize or snapshot).

One of: resize, snapshot, attach, detach, reassign, switch_performance_tier

region string optional

Example: atl1

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

params object optional
Show child properties
sizeGib integer required

Example: 2048

The new size for the NFS share.

nfs_action_snapshot

type string required

The type of action to initiate for the NFS share (such as resize or snapshot).

One of: resize, snapshot, attach, detach, reassign, switch_performance_tier

region string optional

Example: atl1

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

params object optional
Show child properties
name string required

Example: daily-backup

Snapshot name of the NFS share

nfs_action_attach

type string required

The type of action to initiate for the NFS share (such as resize or snapshot).

One of: resize, snapshot, attach, detach, reassign, switch_performance_tier

region string optional

Example: atl1

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

params object optional
Show child properties
vpcId string required

Example: vpc-id-123

The ID of the VPC to which the NFS share will be attached

nfs_action_detach

type string required

The type of action to initiate for the NFS share (such as resize or snapshot).

One of: resize, snapshot, attach, detach, reassign, switch_performance_tier

region string optional

Example: atl1

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

params object optional
Show child properties
vpcId string required

Example: vpc-id-123

The ID of the VPC from which the NFS share will be detached

nfs_action_reassign

type string required

The type of action to initiate for the NFS share (such as resize or snapshot).

One of: resize, snapshot, attach, detach, reassign, switch_performance_tier

region string optional

Example: atl1

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

params object optional
Show child properties
oldVpcId string required

Example: vpc-id-123

The ID of the VPC from which the NFS share will be reassigned

newVpcId string required

Example: vpc-id-456

The ID of the VPC to which the NFS share will be reassigned

nfs_action_switch_performance_tier

type string required

The type of action to initiate for the NFS share (such as resize or snapshot).

One of: resize, snapshot, attach, detach, reassign, switch_performance_tier

region string optional

Example: atl1

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

params object optional
Show child properties
performanceTier string required

Example: standard

The performance tier to which the NFS share will be switched (e.g., standard, high).

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
    .byNfs_id("0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d").actions.post({
    type: "resize",
    region: "atl1",
});

Response Example

Show Response Example
{
  "action": {
    "id": "084c3b9c-2382-441b-92d4-10b095bb5d7c",
    "region_slug": "atl1",
    "resource_id": "baf4827c-6fa9-456f-9dbd-9ddfcacd0720",
    "resource_type": "SHARE",
    "type": "RESIZE_SHARE",
    "status": "IN_PROGRESS",
    "started_at": "2026-06-25T08:11:12Z"
  }
}

More Information

See /v2/nfs/{nfs_id}/actions 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.