pydo.vpc_peerings.list()

Generated on 7 Jul 2026 from pydo version v0.39.0

Usage

client.vpc_peerings.list(
    per_page=20,
    page=1,
    region=None,
)
Returns JSONRaises HttpResponseError

Description

To list all of the VPC peerings on your account, send a GET request to /v2/vpc_peerings.

Parameters

per_page integer optional

Number of items returned per page

Min: 1

Max: 200

Default: 20

page integer optional

Which 'page' of paginated results to return.

Min: 1

Default: 1

region string optional

The slug identifier for the region where the resource is available.

One of: ams1, ams2, ams3, blr1, fra1, lon1, nyc1, nyc2, nyc3, sfo1, sfo2, sfo3, sgp1, tor1, syd1

Pagination

This method returns paginated results. The response includes a links.pages object with URLs for navigating between pages. To retrieve the next page, parse the next URL and pass the page parameter:

from urllib.parse import urlparse, parse_qs

resp = client.vpc_peerings.list()
pages = resp.get("links", {}).get("pages", {})

while "next" in pages:
    parsed = urlparse(pages["next"])
    page = int(parse_qs(parsed.query)["page"][0])
    resp = client.vpc_peerings.list(page=page)
    pages = resp.get("links", {}).get("pages", {})

Response Example

Show Response Example
{
  "vpc_peerings": [
    {
      "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": "ACTIVE"
    },
    {
      "id": "c212b274-911c-44cc-a117-23b7da4a2922",
      "name": "another-vpc-peering",
      "vpc_ids": [
        "5a100736-b085-4f69-81fd-feee325784bb",
        "c140286f-e6ce-4131-8b7b-df4590ce8d6a"
      ],
      "created_at": "2024-01-10T13:29:58Z",
      "status": "ACTIVE"
    }
  ],
  "links": {},
  "meta": {
    "total": 2
  }
}

More Information

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