v8

latestOpenAPI 3.0.0Apache 2.0raw.githubusercontent.com2025-10-165266542.4 MB
DigitalOcean-public.v2-new_VPC Peerings

Create a New VPC Peering

To create a new VPC Peering, send a POST request to /v2/vpc_peerings specifying a name and a list of two VPC IDs to peer. The response code, 202 Accepted, does not indicate the success or failure of the operation, just that the request has been accepted for processing.

post/v2/vpc_peerings

Request body

namestring required

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

vpc_idsstring[] required

An array of the two peered VPCs IDs.

Example request

{
  "name": "nyc1-blr1-peering",
  "vpc_ids": [
    "c140286f-e6ce-4131-8b7b-df4590ce8d6a",
    "994a2735-dc84-11e8-80bc-3cfdfea9fba1"
  ]
}

Response

The response will be a JSON object with a key called vpc_peering. The value of this will be an object that contains the standard attributes associated with a VPC peering.

Example response

{
  "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": "PROVISIONING"
  }
}