v8

latestOpenAPI 3.0.0Apache 2.0raw.githubusercontent.com2025-10-165266542.4 MB
DigitalOcean-public.v2-new_[Public Preview] VPC NAT Gateways

Create a New VPC NAT Gateway

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.

post/v2/vpc_nat_gateways

Request body

namestring required

The human-readable name of the VPC NAT gateway.

type'PUBLIC' required

The type of the VPC NAT gateway.

region'nyc1' | 'nyc2' | 'nyc3' | 'ams2' | 'ams3' | 'sfo1' | 'sfo2' | 'sfo3' | 'sgp1' | 'lon1' | 'fra1' | 'tor1' | 'blr1' | 'syd1' | 'atl1' required

The region in which the VPC NAT gateway is created.

sizeinteger required

The size of the VPC NAT gateway.

udp_timeout_secondsinteger

The UDP timeout in seconds for the VPC NAT gateway.

icmp_timeout_secondsinteger

The ICMP timeout in seconds for the VPC NAT gateway.

tcp_timeout_secondsinteger

The TCP timeout in seconds for the VPC NAT gateway.

Example request

{
  "name": "my-vpc-nat-gateway",
  "type": "PUBLIC",
  "region": "tor1",
  "size": 1,
  "vpcs": [
    {
      "vpc_uuid": "0d3db13e-a604-4944-9827-7ec2642d32ac"
    }
  ],
  "udp_timeout_seconds": 30,
  "icmp_timeout_seconds": 30,
  "tcp_timeout_seconds": 30
}

Response

The response will be a JSON object with a key called vpc_nat_gateway. This will be set to a JSON object that contains the standard VPC NAT gateway attributes.

Example response

{
  "vpc_nat_gateway": {
    "id": "70e1b58d-cdec-4e95-b3ee-2d4d95feff51",
    "name": "my-vpc-nat-gateway",
    "type": "PUBLIC",
    "state": "ACTIVE",
    "region": "tor1",
    "size": 1,
    "vpcs": [
      {
        "vpc_uuid": "0d3db13e-a604-4944-9827-7ec2642d32ac",
        "gateway_ip": "10.118.0.35"
      }
    ],
    "egresses": {
      "public_gateways": [
        {
          "ipv4": "174.138.113.197"
        }
      ]
    },
    "udp_timeout_seconds": 30,
    "icmp_timeout_seconds": 30,
    "tcp_timeout_seconds": 30,
    "created_at": "2020-07-28T18:00:00Z",
    "updated_at": "2020-07-28T18:00:00Z"
  }
}