Initiate an NFS action
nfs.initiate_action(strnfs_id, NfInitiateActionParams**kwargs) -> NfInitiateActionResponse
/v2/nfs/{nfs_id}/actions
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 |
Parameters
nfs_id: str
region: str
The DigitalOcean region slug (e.g. atl1, nyc2) where the NFS snapshot resides.
Returns
Initiate an NFS action
from gradient import Gradient
client = Gradient(
access_token="My Access Token",
)
response = client.nfs.initiate_action(
nfs_id="0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
region="atl1",
type="resize",
)
print(response.action)
{
"action": {
"region_slug": "atl1",
"resource_id": "b5eb9e60-6750-4f3f-90b6-8296966eaf35",
"resource_type": "network_file_share",
"started_at": "2025-10-14T11:55:31.615157397Z",
"status": "in-progress",
"type": "resize"
}
}Returns Examples
{
"action": {
"region_slug": "atl1",
"resource_id": "b5eb9e60-6750-4f3f-90b6-8296966eaf35",
"resource_type": "network_file_share",
"started_at": "2025-10-14T11:55:31.615157397Z",
"status": "in-progress",
"type": "resize"
}
}