godo.NfsActions.SwitchPerformanceTier()

Generated on 5 Nov 2026 from godo version v1.236.0

Usage

client.NfsActions.SwitchPerformanceTier(ctx context.Context, nfsShareId string, tier string) (*godo.NfsAction, *godo.Response, error)

Description

Switch performance tier of an NFS share

This method sends a POST request to /v2/nfs/{}/actions.

Parameters

nfsShareId string required
tier string required

Returns

*godo.NfsAction
*godo.Response

The HTTP response, with pagination Links, Meta, and Rate limit information.

error

Non-nil when the request fails. API errors are returned as *godo.ErrorResponse.

Fields of godo.NfsAction

NfsAction represents an NFS action

ID string

JSON key: id

Status string

JSON key: status

Type string

JSON key: type

StartedAt *godo.Timestamp

JSON key: started_at

CompletedAt *godo.Timestamp

JSON key: completed_at

ResourceID string

JSON key: resource_id

ResourceType string

JSON key: resource_type

Region *godo.Region

Omitted from JSON when empty. JSON key: region

RegionSlug string

Omitted from JSON when empty. JSON key: region_slug

Request Sample

Show Request Sample
package main

import (
	"context"
	"fmt"
	"log"
	"os"

	"github.com/digitalocean/godo"
)

func main() {
	client := godo.NewFromToken(os.Getenv("DIGITALOCEAN_TOKEN"))
	ctx := context.TODO()

	result, _, err := client.NfsActions.SwitchPerformanceTier(ctx, "<your-nfs-share-id>", "<your-tier>")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", result)
}

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 POST /v2/nfs/{}/actions in the API reference for additional detail on responses, headers, parameters, and more.

See the Go package documentation for the source of this method.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.