Skip to content

List VPC Peerings

client.projects.vpcs.peerings.list(stringvpcID, PeeringListParams { project_id } params, RequestOptionsoptions?): PeeringListResponse { id, error_message, peer_account_id, 4 more }
GET/projects/{project_id}/vpcs/{vpc_id}/peerings

Retrieves a list of all VPC peering connections for a given VPC.

ParametersExpand Collapse
vpcID: string
params: PeeringListParams { project_id }
project_id: string

The unique identifier of the project.

ReturnsExpand Collapse
PeeringListResponse = Array<Peering { id, error_message, peer_account_id, 4 more } >
id?: string
error_message?: string
peer_account_id?: string
peer_region_code?: string
peer_vpc_id?: string
provisioned_id?: string
status?: string

List VPC Peerings

import TigerCloud from 'tiger-cloud';

const client = new TigerCloud({
  apiKey: process.env['TIGER_CLOUD_API_KEY'], // This is the default and can be omitted
});

const peerings = await client.projects.vpcs.peerings.list('1234567890', {
  project_id: 'rp1pz7uyae',
});

console.log(peerings);
[
  {
    "id": "1234567890",
    "error_message": "VPC not found",
    "peer_account_id": "acc-12345",
    "peer_region_code": "aws-us-east-1",
    "peer_vpc_id": "1234567890",
    "provisioned_id": "1234567890",
    "status": "active"
  }
]
Returns Examples
[
  {
    "id": "1234567890",
    "error_message": "VPC not found",
    "peer_account_id": "acc-12345",
    "peer_region_code": "aws-us-east-1",
    "peer_vpc_id": "1234567890",
    "provisioned_id": "1234567890",
    "status": "active"
  }
]