dots.v2.vpc_nat_gateways.post()
Generated on 27 Oct 2026
from DoTs version
v1.21.0
Usage
client.v2.vpc_nat_gateways.post(body: Vpc_nat_gateway_create, requestConfiguration?: RequestConfiguration<object>): Promise<undefined | Vpc_nat_gatewaysPostResponse>Description
To create a new VPC NAT gateway, send a POST request to /v2/vpc_nat_gateways setting the required attributes.
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.
Parameters
namestring requiredExample:
my-vpc-nat-gatewayThe human-readable name of the VPC NAT gateway.
typestring requiredExample:
PUBLICThe type of the VPC NAT gateway.
regionstring requiredThe region in which the VPC NAT gateway is created.
sizeinteger requiredExample:
1The size of the VPC NAT gateway.
vpcsarray of objects requiredAn array of VPCs associated with the VPC NAT gateway.
Show child properties
vpcUuidstring requiredExample:
0d3db13e-a604-4944-9827-7ec2642d32acThe unique identifier of the VPC to which the NAT gateway is attached.
subnetUuidstring optionalExample:
cbd79771-23eb-49be-b5ea-59cc56222622The unique identifier of the VPC subnet to which the NAT gateway is attached.
defaultGatewayboolean optionalExample:
trueThe classification of the NAT gateway as the default egress route for the VPC traffic.
udpTimeoutSecondsinteger optionalExample:
30The UDP timeout in seconds for the VPC NAT gateway.
icmpTimeoutSecondsinteger optionalExample:
30The ICMP timeout in seconds for the VPC NAT gateway.
tcpTimeoutSecondsinteger optionalExample:
30The TCP timeout in seconds for the VPC NAT gateway.
egressesobject optionalAn optional object specifying the public egress IP address to assign to the VPC NAT gateway. Provide this only to use a specific address. If omitted, DigitalOcean allocates a public IP address automatically.
Show child properties
publicGatewaysarray of objects optionalAn array containing a single public gateway object that sets the gateway's public egress IP address.
Request Sample
Response Example
More Information
See /v2/vpc_nat_gateways in the API reference for additional detail on responses, headers, parameters, and more.