Skip to content

Rename a VPC

client.projects.vpcs.rename(stringvpcID, VpcRenameParams { project_id, name } params, RequestOptionsoptions?): Vpc { id, cidr, name, region_code }
POST/projects/{project_id}/vpcs/{vpc_id}/rename

Updates the name of a specific VPC.

ParametersExpand Collapse
vpcID: string
params: VpcRenameParams { project_id, name }
project_id: string

Path param: The unique identifier of the project.

name: string

Body param: The new name for the VPC.

ReturnsExpand Collapse
Vpc { id, cidr, name, region_code }
id?: string
cidr?: string
name?: string
region_code?: string

Rename 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.rename('1234567890', {
  project_id: 'rp1pz7uyae',
  name: 'my-renamed-vpc',
});

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"
}