godo.Nfs.ListAccessPoints()

Generated on 5 Nov 2026 from godo version v1.236.0

Usage

client.Nfs.ListAccessPoints(ctx context.Context, shareID string, opts *godo.NfsListAccessPointsOptions) ([]*godo.NfsAccessPoint, *godo.Response, error)

Description

ListAccessPoints returns all access points for a share.

This method sends a GET request to /v2/nfs/shares/{}/access_points.

Parameters

shareID string required
opts *godo.NfsListAccessPointsOptions

Fields of godo.NfsListAccessPointsOptions

NfsListAccessPointsOptions represents filters for listing access points.

Status godo.NfsAccessPointStatus

Returns

[]*godo.NfsAccessPoint
*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.NfsAccessPoint

NfsAccessPoint represents an NFS access point.

ID string

JSON key: id

Name string

JSON key: name

ShareID string

JSON key: share_id

Path string

JSON key: path

Status godo.NfsAccessPointStatus

JSON key: status

AccessPolicy godo.NfsAccessPolicy

JSON key: access_policy

CreatedAt string

JSON key: created_at

UpdatedAt string

JSON key: updated_at

IsDefault bool

JSON key: is_default

VpcID *string

Omitted from JSON when empty. JSON key: vpc_id

VpcIDs []string

Omitted from JSON when empty. JSON key: vpc_ids

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.Nfs.ListAccessPoints(ctx, "<your-share-id>", &godo.NfsListAccessPointsOptions{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", result)
}

Response Example

Show Response Example
{
  "access_points": [
    {
      "id": "becd9f04-8afa-4ccd-b03e-9676447df603",
      "name": "default",
      "share_id": "baf4827c-6fa9-456f-9dbd-9ddfcacd0720",
      "path": "/",
      "status": "ACCESS_POINT_ACTIVE",
      "is_default": true,
      "created_at": "2026-06-25T08:10:29Z",
      "updated_at": "2026-06-25T08:10:37Z",
      "access_policy": {
        "anonuid": 65534,
        "anongid": 65534,
        "protocols": [
          "NFS4",
          "NFS"
        ],
        "squash_config": "ROOT_SQUASH",
        "identity_enforcement_enabled": false
      }
    },
    {
      "id": "7659ce91-354d-4f61-9cda-ae2c7feb61d9",
      "name": "other-vpc",
      "share_id": "baf4827c-6fa9-456f-9dbd-9ddfcacd0720",
      "path": "/other-vpc",
      "vpc_id": "3f34cdb2-1e4f-4100-b5c7-f55f2762085f",
      "status": "ACCESS_POINT_ACTIVE",
      "is_default": false,
      "created_at": "2026-06-25T08:11:12Z",
      "updated_at": "2026-06-25T08:11:16Z",
      "access_policy": {
        "anonuid": 65534,
        "anongid": 65534,
        "protocols": [
          "NFS4",
          "NFS"
        ],
        "squash_config": "ROOT_SQUASH",
        "identity_enforcement_enabled": false
      }
    }
  ]
}

More Information

See GET /v2/nfs/shares/{}/access_points 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.