Skip to content

Commit cf9c10d

Browse files
nfs access apis
1 parent 14f1f34 commit cf9c10d

14 files changed

Lines changed: 611 additions & 0 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: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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+
type: object
9+
description: The action that was submitted for the access point mutation.
10+
properties:
11+
id:
12+
type: string
13+
description: The unique identifier of the action.
14+
example: "1"
15+
region_slug:
16+
type: string
17+
description: The DigitalOcean region slug where the resource is located.
18+
example: "atl1"
19+
resource_id:
20+
type: string
21+
format: uuid
22+
description: The unique identifier of the resource on which the action is being performed.
23+
example: "a1b2c3d4-e5f6-4a5b-9c8d-1e2f3a4b5c6d"
24+
resource_type:
25+
type: string
26+
enum: ["network_file_share"]
27+
description: The type of resource on which the action is being performed.
28+
example: "network_file_share"
29+
started_at:
30+
type: string
31+
format: date-time
32+
description: The timestamp when the action was started.
33+
example: "2025-10-14T11:55:31.615157397Z"
34+
status:
35+
type: string
36+
enum: ["in-progress", "completed", "errored"]
37+
description: The current status of the action.
38+
example: "in-progress"
39+
type:
40+
type: string
41+
description: The type of action being performed. Access point mutations use CREATE_ACCESS_POINT and DELETE_ACCESS_POINT.
42+
example: "CREATE_ACCESS_POINT"
43+
required:
44+
- region_slug
45+
- resource_id
46+
- resource_type
47+
- started_at
48+
- status
49+
- type
50+
required:
51+
- access_point
52+
- action
53+
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
example:
11+
- id: "a1b2c3d4-e5f6-4a5b-9c8d-1e2f3a4b5c6d"
12+
name: "my-access-point"
13+
share_id: "0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d"
14+
path: "/exports/data"
15+
status: "ACCESS_POINT_ACTIVE"
16+
is_default: false
17+
created_at: "2023-01-01T00:00:00Z"
18+
updated_at: "2023-01-01T01:00:00Z"
19+
required:
20+
- access_points
21+
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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: The name for the access point. Must be unique per share.
8+
example: "my-access-point"
9+
path:
10+
type: string
11+
description: The export sub-path. Must start with "/" and cannot be "/".
12+
example: "/exports/data"
13+
access_policy:
14+
$ref: "access_policy.yml"
15+
vpc_id:
16+
type: string
17+
description: |
18+
Optional VPC to mount this access point from. When unset (or set to a VPC the share
19+
is already attached to), the access point inherits the share's VPC and storage gateway.
20+
When set to a different VPC, a storage gateway is provisioned or reused in that VPC.
21+
nullable: true
22+
example: "796c6fe3-2a1d-4da2-9f3e-38239827dc91"
23+
required:
24+
- name
25+
- path
26+
- access_policy
27+
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
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: "my-access-point"
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. Must start with "/" and cannot be "/".
24+
example: "/exports/data"
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+
format: date-time
45+
description: The timestamp when the access point was last updated.
46+
readOnly: true
47+
example: "2023-01-01T01:00:00Z"
48+
is_default:
49+
type: boolean
50+
description: Whether this is the share's default access point.
51+
readOnly: true
52+
example: false
53+
vpc_id:
54+
type: string
55+
description: |
56+
The VPC this access point is pinned to. When unset, the access point inherits
57+
the parent share's VPC(s). When set, the access point is mountable from this
58+
specific VPC with its own storage gateway.
59+
nullable: true
60+
example: "796c6fe3-2a1d-4da2-9f3e-38239827dc91"
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
71+
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
type: object
3+
description: Provider-agnostic NFS access policy for an access point.
4+
properties:
5+
anonuid:
6+
type: integer
7+
description: UID used for squashed users. Currently only 65534 is supported.
8+
example: 65534
9+
anongid:
10+
type: integer
11+
description: GID used for squashed users. Currently only 65534 is supported.
12+
example: 65534
13+
protocols:
14+
type: array
15+
items:
16+
type: string
17+
enum: ["NFS", "NFS4"]
18+
description: Allowed NFS protocols for this export.
19+
example: ["NFS4"]
20+
squash_config:
21+
type: string
22+
enum: ["NO_SQUASH", "ROOT_SQUASH", "ALL_SQUASH"]
23+
description: The squash mode applied to the access point export.
24+
example: "ROOT_SQUASH"
25+
identity_enforcement_enabled:
26+
type: boolean
27+
description: Whether identity enforcement is enabled for this export.
28+
example: true
29+
required:
30+
- anonuid
31+
- anongid
32+
- protocols
33+
- squash_config
34+
- identity_enforcement_enabled
35+
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
operationId: nfs_create_access_point
2+
3+
summary: Create an NFS access point
4+
5+
description: |
6+
To create a new access point on an NFS share, send a POST request to
7+
`/v2/nfs/shares/{share_id}/access_points`.
8+
9+
A successful request will return the newly created access point and an action object.
10+
11+
tags:
12+
- NFS
13+
14+
parameters:
15+
- name: share_id
16+
in: path
17+
required: true
18+
schema:
19+
type: string
20+
format: uuid
21+
description: The unique identifier of the NFS share.
22+
example: "0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d"
23+
24+
requestBody:
25+
required: true
26+
content:
27+
application/json:
28+
schema:
29+
$ref: 'models/access_point_request.yml'
30+
examples:
31+
Basic Access Point:
32+
value:
33+
name: "my-access-point"
34+
path: "/exports/data"
35+
access_policy:
36+
anonuid: 65534
37+
anongid: 65534
38+
protocols: ["NFS4"]
39+
squash_config: "ROOT_SQUASH"
40+
identity_enforcement_enabled: true
41+
42+
responses:
43+
'201':
44+
$ref: 'responses/access_point_create.yml'
45+
46+
'400':
47+
$ref: 'responses/bad_request.yml'
48+
49+
'401':
50+
$ref: '../../shared/responses/unauthorized.yml'
51+
52+
'404':
53+
$ref: '../../shared/responses/not_found.yml'
54+
55+
'429':
56+
$ref: '../../shared/responses/too_many_requests.yml'
57+
58+
'500':
59+
$ref: '../../shared/responses/server_error.yml'
60+
61+
default:
62+
$ref: '../../shared/responses/unexpected_error.yml'
63+
64+
security:
65+
- bearer_auth:
66+
- "nfs:create"
67+
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
operationId: nfs_delete_access_point
2+
3+
summary: Delete an NFS access point
4+
5+
description: |
6+
To delete an NFS access point, send a DELETE request to
7+
`/v2/nfs/access_points/{access_point_id}`.
8+
9+
A successful request will soft-delete the access point and return the deleted access point
10+
with status `ACCESS_POINT_DELETED` and an action object indicating the delete operation.
11+
12+
tags:
13+
- NFS
14+
15+
parameters:
16+
- name: access_point_id
17+
in: path
18+
required: true
19+
schema:
20+
type: string
21+
format: uuid
22+
description: The unique identifier of the NFS access point.
23+
example: "a1b2c3d4-e5f6-4a5b-9c8d-1e2f3a4b5c6d"
24+
25+
responses:
26+
"200":
27+
$ref: "responses/access_point_delete.yml"
28+
29+
"401":
30+
$ref: "../../shared/responses/unauthorized.yml"
31+
32+
"404":
33+
$ref: "../../shared/responses/not_found.yml"
34+
35+
"429":
36+
$ref: "../../shared/responses/too_many_requests.yml"
37+
38+
"500":
39+
$ref: "../../shared/responses/server_error.yml"
40+
41+
default:
42+
$ref: "../../shared/responses/unexpected_error.yml"
43+
44+
security:
45+
- bearer_auth:
46+
- "nfs:delete"
47+
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
operationId: nfs_get_access_point
2+
3+
summary: Get an NFS access point
4+
5+
description: |
6+
To get an NFS access point, send a GET request to `/v2/nfs/access_points/{access_point_id}`.
7+
8+
A successful request will return the NFS access point.
9+
10+
tags:
11+
- NFS
12+
13+
parameters:
14+
- name: access_point_id
15+
in: path
16+
required: true
17+
schema:
18+
type: string
19+
format: uuid
20+
description: The unique identifier of the NFS access point.
21+
example: "a1b2c3d4-e5f6-4a5b-9c8d-1e2f3a4b5c6d"
22+
23+
responses:
24+
"200":
25+
$ref: "responses/access_point_get.yml"
26+
27+
"401":
28+
$ref: "../../shared/responses/unauthorized.yml"
29+
30+
"404":
31+
$ref: "../../shared/responses/not_found.yml"
32+
33+
"429":
34+
$ref: "../../shared/responses/too_many_requests.yml"
35+
36+
"500":
37+
$ref: "../../shared/responses/server_error.yml"
38+
39+
default:
40+
$ref: "../../shared/responses/unexpected_error.yml"
41+
42+
security:
43+
- bearer_auth:
44+
- "nfs:read"
45+

0 commit comments

Comments
 (0)