VPCs v4.176.0

List VPCs

GET https://api.linode.com/v4/vpcs

Display all VPCs on your account.

Authorizations

personalAccessToken
oauth

Query Parameters

page
Type:
integer >= 1
Default: 1
Default:
1

The page of a collection to return.

page_size
Type:
integer 25..500
Default: 100
Default:
100

The number of items to return per page.

Request Samples

Response Samples

Responses

Create a VPC

POST https://api.linode.com/v4/vpcs

Create a new VPC and optionally associated VPC Subnets.

  • Users must have the add_vpc grant to access this operation.
  • A successful request triggers a vpc_create event and subnet_create events for any created VPC Subnets.

Once a VPC is created, it can be attached to a Linode by assigning a VPC Subnet to one of the Linode’s Configuration Profile Interfaces. This step can be accomplished with the following operations:


Authorizations

personalAccessToken
oauthvpc:read_write

Request Samples

Request Body Schema

description
string <= 255 characters

A written description to help distinguish the VPC.

label
Required
string 1..64 characters

The VPC’s label, for display purposes only.

  • Needs to be unique among the Account’s VPCs.
  • Can only contain ASCII letters, numbers, and hyphens (-). You can’t use two consecutive hyphens (--).

region
Required
string

The Region for the VPC.

subnets
array of objects

A list of subnets associated with the VPC.

ipv4
Required
string<ip>

IPv4 range in CIDR canonical form.

  • The range must belong to a private address space as defined in RFC1918.
  • Allowed prefix lengths: 1-29.
  • The range must not overlap with 192.168.128.0/17.
  • The range must not overlap with other Subnets on the same VPC.

label
Required
string 1..64 characters

The VPC Subnet’s label, for display purposes only.

  • Must be unique among the VPC’s Subnets.
  • Can only contain ASCII letters, numbers, and hyphens (-). You can’t use two consecutive hyphens (--).

Response Samples

Responses

Delete a VPC

DELETE https://api.linode.com/v4/vpcs/{vpcId}

Delete a single VPC and all of its Subnets.

  • The User accessing this operation must have read_write grants to the VPC.
  • A successful request triggers a vpc_delete event and subnet_delete events for each deleted VPC Subnet.
  • All of the VPC’s Subnets must be eligible for deletion. Accordingly, all Configuration Profile Interfaces that each Subnet is assigned to must first be deleted. If those Interfaces are active, the associated Linodes must first be shut down before they can be removed. If any Subnet cannot be deleted, then neither the VPC nor any of its Subnets are deleted.

Authorizations

personalAccessToken
oauthvpc:read_write

Path Parameters

vpcIdinteger
Required

The id of the VPC.

Request Samples

Response Samples

Responses

Get a VPC

GET https://api.linode.com/v4/vpcs/{vpcId}

Get information about a single VPC.

Authorizations

personalAccessToken
oauth

Path Parameters

vpcIdinteger
Required

The id of the VPC.

Request Samples

Response Samples

Responses

Update a VPC

PUT https://api.linode.com/v4/vpcs/{vpcId}

Update an existing VPC.

  • The User accessing this operation must have read_write grants to the VPC.
  • A successful request triggers a vpc_update event.

To update a VPC’s Subnet, run the Update a VPC subnet operation.


Authorizations

personalAccessToken
oauthvpc:read_write

Path Parameters

vpcIdinteger
Required

The id of the VPC.

Request Samples

Request Body Schema

description
string <= 255 characters

A written description to help distinguish the VPC.

label
string 1..64 characters

The VPC’s label, for display purposes only.

  • Needs to be unique among the Account’s VPCs.
  • Can only contain ASCII letters, numbers, and hyphens (-). You can’t use two consecutive hyphens (--).

Response Samples

Responses