POST/v2/nfs/{nfs_id}/actions

Trigger an action on an NFS share

Triggers an action on an NFS share, such as resizing it, taking a snapshot, or changing its VPC attachment. Set type to a supported action and supply the corresponding values in params, such as size_gib for resize or vpc_id for attach and detach. A 201 response returns the submitted action object for tracking its status.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 3 body fields
nfs_idstringrequired
The unique identifier of the NFS share on which to perform the action.

The action to perform on the NFS share, with any action-specific values in params.

typestringrequired
The type of action to initiate for the NFS share (such as resize or snapshot).
Allowed:resizesnapshotattachdetachreassignswitch_performance_tier
regionstringoptional
The DigitalOcean region slug (e.g. atl1, nyc2) where the NFS snapshot resides.
paramsobjectoptional

6 status codes
201Returns a JSON object containing the submitted action, including its identifier, resource details, start time, status, and action type.
actionobjectrequired
The action that was submitted.
401Returned when authentication fails because the supplied credentials are invalid.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404Returned when the requested NFS share cannot be found.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429Returned when the API rate limit has been exceeded.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500Returned when a server error occurs.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
defaultThere was an unexpected error.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.

Error handling

A 401 is returned when authentication credentials are invalid. A 404 is returned when the NFS share cannot be found. A 429 indicates that the API rate limit has been exceeded, and a 500 indicates a server error. The nfs_id path parameter must identify an existing NFS share, and the request body must include type set to a supported action: resize, snapshot, attach, detach, reassign, or switch_performance_tier.