Skip to content

Commit f16255f

Browse files
sgupta832v-amanjain-afkcursoragent
authored
Nfs access point apis (#1192)
* nfs access apis * Address review feedback on NFS access point OpenAPI spec. Align models and examples with sharesvc behavior: fix delete action status, document validation constraints, add access_points to share responses, dedupe the action schema, and wire get/list responses to shared model files. Co-authored-by: Cursor <cursoragent@cursor.com> * Require vpc_id when creating an NFS access point. Align the create request model and examples with cthulhu: every non-default access point must be pinned to a VPC at creation time. Co-authored-by: Cursor <cursoragent@cursor.com> * Address PR review feedback on NFS access point OpenAPI spec. Use real API response samples, correct action enums (SHARE/IN_PROGRESS), add access-point-specific 400 responses, and add cURL code samples for all four access point operations. Co-authored-by: Cursor <cursoragent@cursor.com> * Align NFS access point spec with module conventions. Use nfs:list for list access points, centralize path params in parameters.yml, enrich nfs_get and nfs_actions examples, and add access-point-specific 400/409 response examples. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: v-amanjain <v-amanjain@digitalocean.com> Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 52a2d77 commit f16255f

28 files changed

Lines changed: 783 additions & 39 deletions

specification/DigitalOcean-public.v2.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1974,6 +1974,20 @@ paths:
19741974
delete:
19751975
$ref: "resources/nfs/nfs_snapshot_delete.yml"
19761976

1977+
/v2/nfs/shares/{share_id}/access_points:
1978+
post:
1979+
$ref: "resources/nfs/nfs_access_point_create.yml"
1980+
1981+
get:
1982+
$ref: "resources/nfs/nfs_access_point_list.yml"
1983+
1984+
/v2/nfs/access_points/{access_point_id}:
1985+
get:
1986+
$ref: "resources/nfs/nfs_access_point_get.yml"
1987+
1988+
delete:
1989+
$ref: "resources/nfs/nfs_access_point_delete.yml"
1990+
19771991
/v2/partner_network_connect/attachments:
19781992
get:
19791993
$ref: "resources/partner_network_connect/partner_attachment_list.yml"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
lang: cURL
2+
source: |-
3+
curl -X POST \
4+
-H "Content-Type: application/json" \
5+
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
6+
-d '{"name": "other-vpc", "path": "/other-vpc", "vpc_id": "3f34cdb2-1e4f-4100-b5c7-f55f2762085f", "access_policy": {"anonuid": 65534, "anongid": 65534, "protocols": ["NFS4", "NFS"], "squash_config": "ROOT_SQUASH", "identity_enforcement_enabled": false}}' \
7+
"https://api.digitalocean.com/v2/nfs/shares/baf4827c-6fa9-456f-9dbd-9ddfcacd0720/access_points"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
lang: cURL
2+
source: |-
3+
curl -X DELETE \
4+
-H "Content-Type: application/json" \
5+
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
6+
"https://api.digitalocean.com/v2/nfs/access_points/7659ce91-354d-4f61-9cda-ae2c7feb61d9"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
lang: cURL
2+
source: |-
3+
curl -X GET \
4+
-H "Content-Type: application/json" \
5+
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
6+
"https://api.digitalocean.com/v2/nfs/access_points/becd9f04-8afa-4ccd-b03e-9676447df603"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
lang: cURL
2+
source: |-
3+
curl -X GET \
4+
-H "Content-Type: application/json" \
5+
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
6+
"https://api.digitalocean.com/v2/nfs/shares/baf4827c-6fa9-456f-9dbd-9ddfcacd0720/access_points"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
type: object
3+
description: Response returned after starting an access point mutation.
4+
properties:
5+
access_point:
6+
$ref: "access_point_response.yml"
7+
action:
8+
$ref: "nfs_action.yml"
9+
required:
10+
- access_point
11+
- action
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
type: object
3+
description: Response containing a single access point.
4+
properties:
5+
access_point:
6+
$ref: "access_point_response.yml"
7+
required:
8+
- access_point
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
type: object
3+
description: Response containing a list of access points.
4+
properties:
5+
access_points:
6+
type: array
7+
items:
8+
$ref: "access_point_response.yml"
9+
description: Array of access point objects.
10+
required:
11+
- access_points
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
type: object
3+
description: Payload for creating a new access point on a share.
4+
properties:
5+
name:
6+
type: string
7+
description: |
8+
The name for the access point. Must be unique per share. Must be 2–63
9+
characters and match `^[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]$`.
10+
The name `default` is reserved (case-insensitive) for the implicit default
11+
access point created with each share.
12+
example: "other-vpc"
13+
path:
14+
type: string
15+
description: |
16+
The export sub-path. Must start with `/`, must not be exactly `/` (reserved
17+
for the default access point), must be at most 1024 characters, may contain
18+
only alphanumerics, `-`, `_`, `.`, and `/`, and must not contain `..` path
19+
segments.
20+
example: "/other-vpc"
21+
access_policy:
22+
$ref: "access_policy.yml"
23+
vpc_id:
24+
type: string
25+
description: |
26+
Required. The VPC this access point will be pinned to. A storage gateway is
27+
provisioned (or reused) in this VPC, and the access point becomes mountable from
28+
this VPC regardless of whether the parent share is currently attached to it.
29+
example: "3f34cdb2-1e4f-4100-b5c7-f55f2762085f"
30+
required:
31+
- name
32+
- path
33+
- access_policy
34+
- vpc_id
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
type: object
3+
description: Represents an NFS access point resource.
4+
properties:
5+
id:
6+
type: string
7+
format: uuid
8+
description: The unique identifier of the access point.
9+
readOnly: true
10+
example: "a1b2c3d4-e5f6-4a5b-9c8d-1e2f3a4b5c6d"
11+
name:
12+
type: string
13+
description: The human-readable name of the access point. Must be unique per share.
14+
example: "other-vpc"
15+
share_id:
16+
type: string
17+
format: uuid
18+
description: The unique identifier of the share this access point belongs to.
19+
readOnly: true
20+
example: "0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d"
21+
path:
22+
type: string
23+
description: The export sub-path for this access point (always starts with `/`).
24+
example: "/other-vpc"
25+
status:
26+
type: string
27+
enum: ["ACCESS_POINT_CREATING", "ACCESS_POINT_ACTIVE", "ACCESS_POINT_FAILED", "ACCESS_POINT_DELETED"]
28+
description: |
29+
The current lifecycle status of an access point. There is no ACCESS_POINT_DELETING state:
30+
DELETE soft-deletes the access point synchronously (mirroring share deletion);
31+
the response of a delete request returns the access point already in ACCESS_POINT_DELETED.
32+
readOnly: true
33+
example: "ACCESS_POINT_ACTIVE"
34+
access_policy:
35+
$ref: "access_policy.yml"
36+
created_at:
37+
type: string
38+
format: date-time
39+
description: The timestamp when the access point was created.
40+
readOnly: true
41+
example: "2023-01-01T00:00:00Z"
42+
updated_at:
43+
type: string
44+
description: |
45+
The timestamp when the access point was last updated. May be empty while the
46+
access point is still being created.
47+
readOnly: true
48+
example: "2026-06-25T08:11:16Z"
49+
is_default:
50+
type: boolean
51+
description: Whether this is the share's default access point.
52+
readOnly: true
53+
example: false
54+
vpc_id:
55+
type: string
56+
description: |
57+
The VPC this access point is pinned to. Omitted on the default access point.
58+
Every non-default access point owns its own storage gateway in this VPC and
59+
is independent of the parent share's VPC lifecycle.
60+
example: "3f34cdb2-1e4f-4100-b5c7-f55f2762085f"
61+
required:
62+
- id
63+
- name
64+
- share_id
65+
- path
66+
- status
67+
- access_policy
68+
- created_at
69+
- updated_at
70+
- is_default

0 commit comments

Comments
 (0)