Create a VPC
client.projects.vpcs.create(stringprojectID, VpcCreateParams { cidr, name, region_code } body, RequestOptionsoptions?): Vpc { id, cidr, name, region_code }
POST/projects/{project_id}/vpcs
Create a VPC
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 vpc = await client.projects.vpcs.create('rp1pz7uyae', {
cidr: '10.0.0.0/16',
name: 'my-production-vpc',
region_code: 'us-east-1',
});
console.log(vpc.id);{
"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"
}