dots.v2.vpcs.byVpc_Id().peerings.byVpc_peering_id().patch()

Generated on 13 Nov 2026 from DoTs version v1.24.0

Usage

client.v2.vpcs.byVpc_Id(vpc_Id).peerings.byVpc_peering_id(vpc_peering_id).patch(body: WithVpc_peering_PatchRequestBody, requestConfiguration?: RequestConfiguration<object>): Promise<undefined | WithVpc_peering_PatchResponse>

Description

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

Parameters

Path Parameters

vpc_Id string required

Example: 4de7ac8b-495b-4884-9a69-1050c6793cd6

A unique identifier for a VPC.

Min: 1

vpc_peering_id string required

Example: 5a4981aa-9653-4bd1-bef5-d6bff52042e4

A unique identifier for a VPC peering.

Request Body

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 { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary";
import {
    createDigitalOceanClient,
    DigitalOceanApiKeyAuthenticationProvider,
} from "@digitalocean/dots";

const authProvider = new DigitalOceanApiKeyAuthenticationProvider(process.env.DIGITALOCEAN_TOKEN!);
const adapter = new FetchRequestAdapter(authProvider);
const client = createDigitalOceanClient(adapter);

const response = await client.v2.vpcs
    .byVpc_Id("4de7ac8b-495b-4884-9a69-1050c6793cd6").peerings
    .byVpc_peering_id("5a4981aa-9653-4bd1-bef5-d6bff52042e4").patch({
    name: "nyc1-blr1-peering",
});

Response Example

Show Response Example
{
  "peering": {
    "id": "6b5c619c-359c-44ca-87e2-47e98170c01d",
    "name": "example-vpc-peering",
    "vpc_ids": [
      "997615ce-132d-4bae-9270-9ee21b395e5d",
      "e51aed59-3bb1-4a6a-8de0-9d1329e9c997"
    ],
    "created_at": "2024-01-09T20:44:32Z",
    "status": "PROVISIONING"
  }
}

More Information

See /v2/vpcs/{vpc_id}/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.