---
title: pydo.vpcs.update()
description: Update a VPC
product: Reference
url: https://docs.digitalocean.com/reference/pydo/reference/vpcs/update/
last_updated: "2026-10-01"
---

> **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](https://docs.digitalocean.com/llms.txt). Markdown versions of pages use the same URL with `index.html.md` in place of the HTML page (for example, append `index.html.md` to the directory path instead of opening the HTML document).

# pydo.vpcs.update()

Generated on 1 Oct 2026 from `pydo` version [`v0.43.0`](https://github.com/digitalocean/pydo/releases/tag/v0.43.0v0.43.0)

## Usage

```python
client.vpcs.update(
    vpc_id="4de7ac8b-495b-4884-9a69-1050c6793cd6",
    body={
        "name": "env.prod-vpc",
        "description": "VPC for production environment",
        "default": True,
    },
)
```

Returns `JSON`Raises `HttpResponseError`

## Description

To update information about a VPC, send a PUT request to [`/v2/vpcs/{vpc_id}`](https://docs.digitalocean.com/reference/api/reference/vpcs/index.html.md#vpcs_update).

## Parameters

`vpc_id` string required

A unique identifier for a VPC.

Min: `1`

`name` string required

Example: `env.prod-vpc`

The name of the VPC. Must be unique and may only contain alphanumeric characters, dashes, and periods.

`description` string optional

Example: `VPC for production environment`

A free-form text field for describing the VPC's purpose. It may be a maximum of 255 characters.

Max length: `255`

`default` boolean optional

Example: `True`

A boolean value indicating whether or not the VPC is the default network for the region. All applicable resources are placed into the default VPC network unless otherwise specified during their creation. The `default` field cannot be unset from `true`. If you want to set a new default VPC network, update the `default` field of another VPC network in the same region. The previous network's `default` field will be set to `false` when a new default VPC has been defined.

## Request Sample

## Show Request Sample

```python
import os
from pydo import Client

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

req = {
  "name": "env.prod-vpc",
  "description": "VPC for production environment",
  "default": True
}

resp = client.vpcs.update(vpc_id="8fdsfa", body=req)
```

## Response Example

## Show Response Example

```json
{
  "vpc": {
    "name": "env.prod-vpc",
    "description": "VPC for production environment",
    "region": "nyc1",
    "ip_range": "10.10.10.0/24",
    "default": true,
    "id": "5a4981aa-9653-4bd1-bef5-d6bff52042e4",
    "urn": "do:vpc:5a4981aa-9653-4bd1-bef5-d6bff52042e4",
    "created_at": "2020-03-13T19:20:47.442049222Z"
  }
}
```

## More Information

See [`/v2/vpcs/{vpc_id}`](https://docs.digitalocean.com/reference/api/reference/vpcs/index.html.md#vpcs_update) in the API reference for additional detail on responses, headers, parameters, and more.