Skip to content

Get a VPC Peering

client.projects.vpcs.peerings.retrieve(stringpeeringID, PeeringRetrieveParams { project_id, vpc_id } params, RequestOptionsoptions?): Peering { id, error_message, peer_account_id, 4 more }
GET/projects/{project_id}/vpcs/{vpc_id}/peerings/{peering_id}

Retrieves the details of a specific VPC peering connection.

ParametersExpand Collapse
peeringID: string
params: PeeringRetrieveParams { project_id, vpc_id }
project_id: string

The unique identifier of the project.

vpc_id: string

The unique identifier of the VPC.

ReturnsExpand Collapse
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

Get a VPC Peering

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 peering = await client.projects.vpcs.peerings.retrieve('1234567890', {
  project_id: 'rp1pz7uyae',
  vpc_id: '1234567890',
});

console.log(peering.id);
{
  "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"
}