Skip to content

Commit 6f71ecc

Browse files
VPC NAT Gateway GA prep (#1116)
* Remove public preview tag * Update examples to include setting default ngw * nits * Update examples to adhere to spec * list response nit --------- Co-authored-by: kishlay-singh-DO <ksingh@digitalocean.com>
1 parent 6628d2f commit 6f71ecc

14 files changed

+123
-17
lines changed

specification/DigitalOcean-public.v2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ tags:
553553
554554
To interact with Uptime, you will generally send requests to the Uptime endpoint at `/v2/uptime/`.
555555
556-
- name: "[Public Preview] VPC NAT Gateways"
556+
- name: "VPC NAT Gateways"
557557
description: |-
558558
[VPC NAT Gateways](https://docs.digitalocean.com/products/networking/vpc/how-to/create-nat-gateway/)
559559
allow resources in a private VPC to access the public internet without

specification/resources/vpc_nat_gateways/examples.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ vpc_nat_gateway_create_request:
66
size: 1
77
vpcs:
88
- vpc_uuid: "0eb1752f-807b-4562-a077-8018e13ab1fb"
9+
default_gateway: true
910
udp_timeout_seconds: 30
1011
icmp_timeout_seconds: 30
1112
tcp_timeout_seconds: 30
@@ -14,9 +15,10 @@ vpc_nat_gateway_create_request:
1415
vpc_nat_gateway_update_request:
1516
value:
1617
name: "test-vpc-nat-gateways-updated"
17-
type: "PUBLIC"
18-
region: "tor1"
1918
size: 2
19+
vpcs:
20+
- vpc_uuid: "0eb1752f-807b-4562-a077-8018e13ab1fb"
21+
default_gateway: false
2022
udp_timeout_seconds: 60
2123
icmp_timeout_seconds: 60
2224
tcp_timeout_seconds: 60

specification/resources/vpc_nat_gateways/examples/curl/vpc_nat_gateway_create.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ source: |-
1010
"size": 1,
1111
"vpcs": [
1212
{
13-
"vpc_uuid": "0eb1752f-807b-4562-a077-8018e13ab1fb"
13+
"vpc_uuid": "0eb1752f-807b-4562-a077-8018e13ab1fb",
14+
"default_gateway": true
1415
}
1516
],
1617
"udp_timeout_seconds": 30,

specification/resources/vpc_nat_gateways/examples/curl/vpc_nat_gateway_update.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@ source: |-
55
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
66
-d '{
77
"name": "test-vpc-nat-gateways",
8-
"type": "PUBLIC",
9-
"region": "tor1",
10-
"size": 5,
8+
"size": 2,
119
"vpcs": [
1210
{
13-
"vpc_uuid": "0eb1752f-807b-4562-a077-8018e13ab1fb"
11+
"vpc_uuid": "0eb1752f-807b-4562-a077-8018e13ab1fb",
12+
"default_gateway": false
1413
}
1514
],
1615
"udp_timeout_seconds": 30,

specification/resources/vpc_nat_gateways/models/vpc_nat_gateway_create.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ properties:
4848
type: string
4949
example: 0d3db13e-a604-4944-9827-7ec2642d32ac
5050
description: The unique identifier of the VPC to which the NAT gateway is attached.
51+
default_gateway:
52+
type: boolean
53+
example: true
54+
description: The classification of the NAT gateway as the default egress route for the VPC traffic.
55+
required:
56+
- vpc_uuid
5157
description: An array of VPCs associated with the VPC NAT gateway.
5258

5359
udp_timeout_seconds:

specification/resources/vpc_nat_gateways/models/vpc_nat_gateway_update.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,22 @@ properties:
1111
example: 1
1212
description: The size of the VPC NAT gateway.
1313

14+
vpcs:
15+
type: array
16+
items:
17+
type: object
18+
properties:
19+
vpc_uuid:
20+
type: string
21+
example: 0d3db13e-a604-4944-9827-7ec2642d32ac
22+
description: The unique identifier of the VPC to which the NAT gateway is attached.
23+
default_gateway:
24+
type: boolean
25+
example: false
26+
description: The classification of the NAT gateway as the default egress route for the VPC traffic.
27+
description:
28+
An array of VPCs associated with the VPC NAT gateway.
29+
1430
udp_timeout_seconds:
1531
type: integer
1632
example: 30

specification/resources/vpc_nat_gateways/responses/examples.yml

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ vpc_nat_gateways:
1919
created_at: "2025-08-12T18:43:14Z"
2020
updated_at: "2025-08-12T19:00:04Z"
2121
project_id: "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30"
22-
links:
23-
pages:
22+
links: {}
2423
meta:
2524
total: 1
2625

@@ -36,6 +35,7 @@ vpc_nat_gateway:
3635
vpcs:
3736
- vpc_uuid: "0eb1752f-807b-4562-a077-8018e13ab1fb"
3837
gateway_ip: "10.118.0.35"
38+
default_gateway: true
3939
egresses:
4040
public_gateways:
4141
- ipv4: "174.138.113.197"
@@ -44,3 +44,43 @@ vpc_nat_gateway:
4444
tcp_timeout_seconds: 30
4545
created_at: "2025-08-12T18:43:14Z"
4646
updated_at: "2025-08-12T19:00:04Z"
47+
48+
vpc_nat_gateway_create:
49+
value:
50+
vpc_nat_gateway:
51+
id: 70e1b58d-cdec-4e95-b3ee-2d4d95feff51
52+
name: "test-vpc-nat-gateways"
53+
type: "PUBLIC"
54+
state: "ACTIVE"
55+
region: "tor1"
56+
size: 1
57+
vpcs:
58+
- vpc_uuid: "0eb1752f-807b-4562-a077-8018e13ab1fb"
59+
default_gateway: true
60+
egresses: {}
61+
udp_timeout_seconds: 30
62+
icmp_timeout_seconds: 30
63+
tcp_timeout_seconds: 30
64+
created_at: "2025-08-12T18:43:14Z"
65+
updated_at: "2025-08-12T18:43:14Z"
66+
67+
vpc_nat_gateway_update:
68+
value:
69+
vpc_nat_gateway:
70+
id: 70e1b58d-cdec-4e95-b3ee-2d4d95feff51
71+
name: "test-vpc-nat-gateways"
72+
type: "PUBLIC"
73+
state: "ACTIVE"
74+
region: "tor1"
75+
size: 2
76+
vpcs:
77+
- vpc_uuid: "0eb1752f-807b-4562-a077-8018e13ab1fb"
78+
gateway_ip: "10.118.0.35"
79+
egresses:
80+
public_gateways:
81+
- ipv4: "174.138.113.197"
82+
udp_timeout_seconds: 30
83+
icmp_timeout_seconds: 30
84+
tcp_timeout_seconds: 30
85+
created_at: "2025-08-12T18:43:14Z"
86+
updated_at: "2025-08-12T19:00:04Z"
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
description: |
2+
The response will be a JSON object with a key called `vpc_nat_gateway`. This will be
3+
set to a JSON object that contains the standard VPC NAT gateway attributes.
4+
5+
headers:
6+
ratelimit-limit:
7+
$ref: '../../../shared/headers.yml#/ratelimit-limit'
8+
ratelimit-remaining:
9+
$ref: '../../../shared/headers.yml#/ratelimit-remaining'
10+
ratelimit-reset:
11+
$ref: '../../../shared/headers.yml#/ratelimit-reset'
12+
13+
content:
14+
application/json:
15+
schema:
16+
properties:
17+
vpc_nat_gateway:
18+
$ref: '../models/vpc_nat_gateway_create.yml'
19+
examples:
20+
VPC NAT Gateway Response:
21+
$ref: 'examples.yml#/vpc_nat_gateway_create'
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
description: |
2+
The response will be a JSON object with a key called `vpc_nat_gateway`. This will be
3+
set to a JSON object that contains the standard VPC NAT gateway attributes.
4+
5+
headers:
6+
ratelimit-limit:
7+
$ref: '../../../shared/headers.yml#/ratelimit-limit'
8+
ratelimit-remaining:
9+
$ref: '../../../shared/headers.yml#/ratelimit-remaining'
10+
ratelimit-reset:
11+
$ref: '../../../shared/headers.yml#/ratelimit-reset'
12+
13+
content:
14+
application/json:
15+
schema:
16+
properties:
17+
vpc_nat_gateway:
18+
$ref: '../models/vpc_nat_gateway_update.yml'
19+
examples:
20+
VPC NAT Gateway Update Response:
21+
$ref: 'examples.yml#/vpc_nat_gateway_update'

specification/resources/vpc_nat_gateways/vpc_nat_gateway_create.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description: |
88
The response body will contain a JSON object with a key called `vpc_nat_gateway` containing the standard attributes for the new VPC NAT gateway.
99
1010
tags:
11-
- "[Public Preview] VPC NAT Gateways"
11+
- "VPC NAT Gateways"
1212

1313
requestBody:
1414
content:
@@ -21,7 +21,7 @@ requestBody:
2121

2222
responses:
2323
'202':
24-
$ref: 'responses/vpc_nat_gateway.yml'
24+
$ref: 'responses/vpc_nat_gateway_create.yml'
2525

2626
'401':
2727
$ref: '../../shared/responses/unauthorized.yml'

0 commit comments

Comments
 (0)