pydo.vpcnatgateways.update()

Generated on 9 Jun 2026 from pydo version v0.36.0

Usage

client.vpcnatgateways.update(
    id="70e1b58d-cdec-4e95-b3ee-2d4d95feff51",
    body={
        "name": "my-vpc-nat-gateway",
        "size": 1,
        "vpcs": [...],
        ...,
    },
)
Returns JSONRaises HttpResponseError

Description

To update the configuration of an existing VPC NAT Gateway, send a PUT request to /v2/vpc_nat_gateways/{id}. The request must contain a full representation of the VPC NAT Gateway including existing attributes.

Parameters

id string required

The unique identifier of the VPC NAT gateway.

name string required

Example: my-vpc-nat-gateway

The human-readable name of the VPC NAT gateway.

size integer required

Example: 1

The size of the VPC NAT gateway.

vpcs array of objects optional

An array of VPCs associated with the VPC NAT gateway.

Show child properties
vpc_uuid string optional

Example: 0d3db13e-a604-4944-9827-7ec2642d32ac

The unique identifier of the VPC to which the NAT gateway is attached.

default_gateway boolean optional

Example: False

The classification of the NAT gateway as the default egress route for the VPC traffic.

udp_timeout_seconds integer optional

Example: 30

The UDP timeout in seconds for the VPC NAT gateway.

icmp_timeout_seconds integer optional

Example: 30

The ICMP timeout in seconds for the VPC NAT gateway.

tcp_timeout_seconds integer optional

Example: 30

The TCP timeout in seconds for the VPC NAT gateway.

Request Sample

Show Request Sample
import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

req = {
  "name": "test-vpc-nat-gateways-updated",
  "size": 2,
  "vpcs": [
    {
      "vpc_uuid": "0eb1752f-807b-4562-a077-8018e13ab1fb",
      "default_gateway": False
    }
  ],
  "udp_timeout_seconds": 60,
  "icmp_timeout_seconds": 60,
  "tcp_timeout_seconds": 60
}

resp = client.vpcnatgateways.update(id="70e1b58d-cdec-4e95-b3ee-2d4d95feff51", body=req)

Response Example

Show Response Example
{
  "vpc_nat_gateway": {
    "id": "70e1b58d-cdec-4e95-b3ee-2d4d95feff51",
    "name": "test-vpc-nat-gateways",
    "type": "PUBLIC",
    "state": "ACTIVE",
    "region": "tor1",
    "size": 2,
    "vpcs": [
      {
        "vpc_uuid": "0eb1752f-807b-4562-a077-8018e13ab1fb",
        "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": "2025-08-12T18:43:14Z",
    "updated_at": "2025-08-12T19:00:04Z"
  }
}

More Information

See /v2/vpc_nat_gateways/{id} in the API reference for additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.