pydo.vpc_peerings.patch()

Generated on 8 May 2026 from pydo version v0.34.0

Usage

client.vpc_peerings.patch(
    vpc_peering_id="5a4981aa-9653-4bd1-bef5-d6bff52042e4",
    body={
        "name": "nyc1-blr1-peering",
    },
)
Returns JSONRaises HttpResponseError

Description

To update the name of a VPC peering, send a PATCH request to /v2/vpc_peerings/{vpc_peering_id} with the new name in the request body.

Parameters

vpc_peering_id string required

A unique identifier for a VPC peering.

name string required

Example: nyc1-blr1-peering

The name of the VPC peering. Must be unique within the team and may only contain alphanumeric characters and dashes.

Request Sample

Show Request Sample
import os
from pydo import Client

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

req = {
  "name": "nyc1-blr1-peering"
}

resp = client.vpc_peerings.patch(vpc_peering_id="5a4981aa-9653-4bd1-bef5-d6bff52042e4", body=req)

Response Example

Show Response Example
{
  "vpc_peering": {
    "id": "5a4981aa-9653-4bd1-bef5-d6bff52042e4",
    "name": "example-vpc-peering",
    "vpc_ids": [
      "997615ce-132d-4bae-9270-9ee21b395e5d",
      "e51aed59-3bb1-4a6a-8de0-9d1329e9c997"
    ],
    "created_at": "2024-01-09T20:44:32Z",
    "status": "ACTIVE"
  }
}

More Information

See /v2/vpc_peerings/{vpc_peering_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.