Skip to content

List All VPCs

client.projects.vpcs.list(stringprojectID, RequestOptionsoptions?): VpcListResponse { id, cidr, name, region_code }
GET/projects/{project_id}/vpcs

Retrieves a list of all Virtual Private Clouds (VPCs).

ParametersExpand Collapse
projectID: string
ReturnsExpand Collapse
VpcListResponse = Array<Vpc { id, cidr, name, region_code } >
id?: string
cidr?: string
name?: string
region_code?: string

List All VPCs

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 vpcs = await client.projects.vpcs.list('rp1pz7uyae');

console.log(vpcs);
[
  {
    "id": "1234567890",
    "cidr": "10.0.0.0/16",
    "name": "my-production-vpc",
    "region_code": "us-east-1"
  }
]
Returns Examples
[
  {
    "id": "1234567890",
    "cidr": "10.0.0.0/16",
    "name": "my-production-vpc",
    "region_code": "us-east-1"
  }
]