{"data":[{"created":"2023-07-11T00:00:00","description":"A description of my VPC.","id":123,"label":"cool-vpc","region":"us-east","subnets":[{"created":"2023-07-11T00:00:00","id":456,"ipv4":"10.0.1.0/24","label":"cool-vpc-subnet","linodes":[{"id":111,"interfaces":[{"active":true,"id":421}]}],"updated":"2023-09-11T00:00:00"}],"updated":"2023-09-11T00:00:00"}],"page":1,"pages":1,"results":1}
{"data":[{"created":"2023-07-11T00:00:00","description":"A description of my VPC.","id":123,"label":"cool-vpc","region":"us-east","subnets":[{"created":"2023-07-11T00:00:00","id":456,"ipv4":"10.0.1.0/24","label":"cool-vpc-subnet","linodes":[{"id":111,"interfaces":[{"active":true,"id":421}]}],"updated":"2023-09-11T00:00:00"}],"updated":"2023-09-11T00:00:00"}],"page":1,"pages":1,"results":1}
{"errors":[{"field":"fieldname","reason":"fieldname must be a valid value"}]}
Responses
A paginated list of VPC objects.
data
array
of objects
created
string<date-time>
The date-time of VPC creation.
description
string
<=
255
characters
A written description to help distinguish the VPC.
id
integer
The unique ID of 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 (--).
region
string
The Region for the VPC.
subnets
array
of objects
A list of subnets associated with the VPC.
created
string<date-time>
The date-time of VPC Subnet creation.
id
integer
The unique ID of the VPC Subnet.
ipv4
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
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 (--).
linodes
array
of objects
An array of Linode IDs assigned to the VPC Subnet.
A Linode is assigned to a VPC Subnet if it has a Configuration Profile with a vpc purpose interface with the subnet’s subnet_id. Even if the Configuration Profile is not active, meaning the Linode does not have access to the Subnet, the Linode still appears in this array.
id
integer
ID of a Linode assigned to the VPC Subnet.
interfaces
array
of objects
An array of Interfaces assigned to the Linode.
active
boolean
Returns true if the Interface is in use, meaning that the Linode was powered on using the Configuration Profile to which the Interface belongs. Otherwise returns false.
id
integer
ID of the interface
updated
Nullable
string<date-time>
The date-time of the most recent VPC Subnet update.
A written description to help distinguish the VPC.
id
integer
The unique ID of 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 (--).
region
string
The Region for the VPC.
subnets
array
of objects
A list of subnets associated with the VPC.
created
string<date-time>
The date-time of VPC Subnet creation.
id
integer
The unique ID of the VPC Subnet.
ipv4
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
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 (--).
linodes
array
of objects
An array of Linode IDs assigned to the VPC Subnet.
A Linode is assigned to a VPC Subnet if it has a Configuration Profile with a vpc purpose interface with the subnet’s subnet_id. Even if the Configuration Profile is not active, meaning the Linode does not have access to the Subnet, the Linode still appears in this array.
id
integer
ID of a Linode assigned to the VPC Subnet.
interfaces
array
of objects
An array of Interfaces assigned to the Linode.
active
boolean
Returns true if the Interface is in use, meaning that the Linode was powered on using the Configuration Profile to which the Interface belongs. Otherwise returns false.
id
integer
ID of the interface
updated
Nullable
string<date-time>
The date-time of the most recent VPC Subnet update.
The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as “null” if the error is not specific to any single element of the request.
reason
string
What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to
open a Support Ticket or perform some other action before you can complete the request successfully.
VPC Create
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 command.
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 commands:
curl https://api.linode.com/v4/vpcs \
-H "Authorization: Bearer $TOKEN"\
-H "Content-Type: application/json"\
-X POST -d '{
"description": "A description of my VPC.",
"label": "cool-vpc",
"region": "us-east",
"subnets": [
{
"label": "cool-vpc-subnet",
"ipv4": "10.0.1.0/24"
}
]
}'
curl https://api.linode.com/v4/vpcs \
-H "Authorization: Bearer $TOKEN"\
-H "Content-Type: application/json"\
-X POST -d '{
"description": "A description of my VPC.",
"label": "cool-vpc",
"region": "us-east",
"subnets": [
{
"label": "cool-vpc-subnet",
"ipv4": "10.0.1.0/24"
}
]
}'
linode-cli vpcs create \
--description "A description of my VPC."\
--label cool-vpc \
--region us-east \
--subnets.label cool-vpc-subnet \
--subnets.ipv4 10.0.1.0/24
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
{"created":"2023-07-11T00:00:00","description":"A description of my VPC.","id":123,"label":"cool-vpc","region":"us-east","subnets":[{"created":"2023-07-11T00:00:00","id":456,"ipv4":"10.0.1.0/24","label":"cool-vpc-subnet","linodes":[{"id":111,"interfaces":[{"active":true,"id":421}]}],"updated":"2023-09-11T00:00:00"}],"updated":"2023-09-11T00:00:00"}
{"created":"2023-07-11T00:00:00","description":"A description of my VPC.","id":123,"label":"cool-vpc","region":"us-east","subnets":[{"created":"2023-07-11T00:00:00","id":456,"ipv4":"10.0.1.0/24","label":"cool-vpc-subnet","linodes":[{"id":111,"interfaces":[{"active":true,"id":421}]}],"updated":"2023-09-11T00:00:00"}],"updated":"2023-09-11T00:00:00"}
{"errors":[{"field":"fieldname","reason":"fieldname must be a valid value"}]}
Responses
The new VPC.
created
string<date-time>
The date-time of VPC creation.
description
string
<=
255
characters
A written description to help distinguish the VPC.
id
integer
The unique ID of 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 (--).
region
string
The Region for the VPC.
subnets
array
of objects
A list of subnets associated with the VPC.
created
string<date-time>
The date-time of VPC Subnet creation.
id
integer
The unique ID of the VPC Subnet.
ipv4
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
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 (--).
linodes
array
of objects
An array of Linode IDs assigned to the VPC Subnet.
A Linode is assigned to a VPC Subnet if it has a Configuration Profile with a vpc purpose interface with the subnet’s subnet_id. Even if the Configuration Profile is not active, meaning the Linode does not have access to the Subnet, the Linode still appears in this array.
id
integer
ID of a Linode assigned to the VPC Subnet.
interfaces
array
of objects
An array of Interfaces assigned to the Linode.
active
boolean
Returns true if the Interface is in use, meaning that the Linode was powered on using the Configuration Profile to which the Interface belongs. Otherwise returns false.
id
integer
ID of the interface
updated
Nullable
string<date-time>
The date-time of the most recent VPC Subnet update.
updated
Nullable
string<date-time>
The date-time of the most recent VPC update.
The new VPC.
created
string<date-time>
The date-time of VPC creation.
description
string
<=
255
characters
A written description to help distinguish the VPC.
id
integer
The unique ID of 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 (--).
region
string
The Region for the VPC.
subnets
array
of objects
A list of subnets associated with the VPC.
created
string<date-time>
The date-time of VPC Subnet creation.
id
integer
The unique ID of the VPC Subnet.
ipv4
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
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 (--).
linodes
array
of objects
An array of Linode IDs assigned to the VPC Subnet.
A Linode is assigned to a VPC Subnet if it has a Configuration Profile with a vpc purpose interface with the subnet’s subnet_id. Even if the Configuration Profile is not active, meaning the Linode does not have access to the Subnet, the Linode still appears in this array.
id
integer
ID of a Linode assigned to the VPC Subnet.
interfaces
array
of objects
An array of Interfaces assigned to the Linode.
active
boolean
Returns true if the Interface is in use, meaning that the Linode was powered on using the Configuration Profile to which the Interface belongs. Otherwise returns false.
id
integer
ID of the interface
updated
Nullable
string<date-time>
The date-time of the most recent VPC Subnet update.
updated
Nullable
string<date-time>
The date-time of the most recent VPC update.
Error
errors
array
of objects
field
string
The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as “null” if the error is not specific to any single element of the request.
reason
string
What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to
open a Support Ticket or perform some other action before you can complete the request successfully.
VPC IP Addresses List
GET
https://api.linode.com/v4/vpcs/ips
Returns a paginated list of all VPC IP addresses and address ranges on your account.
Note: If a Linode has several configuration profiles that include a VPC interface, address information for all of them is listed in the response. Since VPCs can use the same address space, you may see duplicate IP addresses.
{"errors":[{"field":"fieldname","reason":"fieldname must be a valid value"}]}
Responses
A paginated list of VPC interface IP addresses.
data
array
of objects
active
boolean
Returns true if the VPC interface is in use, meaning that the Linode was powered on using the config_id to which the interface belongs. Otherwise returns false.
address
Nullable
string<ip>
An IPv4 address configured for this VPC interface. Displayed as null if an address_range.
address_range
Nullable
string
A range of IPv4 addresses configured for this VPC interface. Displayed as null if a single address.
config_id
integer
The globally general entity identifier for the Linode configuration profile where the VPC is included.
gateway
Nullable
string<ip>
The default gateway for the VPC subnet that the IP or IP range belongs to.
interface_id
integer
The globally general API entity identifier for the Linode interface.
linode_id
integer
The identifier for the Linode the VPC interface currently belongs to.
nat_1_1
Nullable
string<ip>
The public IP address used for NAT 1:1 with the VPC. This is null if the VPC interface uses an address_range or NAT 1:1 isn’t used.
prefix
Nullable
integer
The number of bits set in the subnet_mask.
region
string
The region of the VPC.
subnet_id
integer
The id of the VPC Subnet for this interface.
subnet_mask
string<ip>
The mask that separates host bits from network bits for the address or address_range.
vpc_id
integer
The unique globally general API entity identifier for the VPC.
Returns true if the VPC interface is in use, meaning that the Linode was powered on using the config_id to which the interface belongs. Otherwise returns false.
address
Nullable
string<ip>
An IPv4 address configured for this VPC interface. Displayed as null if an address_range.
address_range
Nullable
string
A range of IPv4 addresses configured for this VPC interface. Displayed as null if a single address.
config_id
integer
The globally general entity identifier for the Linode configuration profile where the VPC is included.
gateway
Nullable
string<ip>
The default gateway for the VPC subnet that the IP or IP range belongs to.
interface_id
integer
The globally general API entity identifier for the Linode interface.
linode_id
integer
The identifier for the Linode the VPC interface currently belongs to.
nat_1_1
Nullable
string<ip>
The public IP address used for NAT 1:1 with the VPC. This is null if the VPC interface uses an address_range or NAT 1:1 isn’t used.
prefix
Nullable
integer
The number of bits set in the subnet_mask.
region
string
The region of the VPC.
subnet_id
integer
The id of the VPC Subnet for this interface.
subnet_mask
string<ip>
The mask that separates host bits from network bits for the address or address_range.
vpc_id
integer
The unique globally general API entity identifier for the VPC.
The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as “null” if the error is not specific to any single element of the request.
reason
string
What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to
open a Support Ticket or perform some other action before you can complete the request successfully.
VPC Delete
DELETE
https://api.linode.com/v4/vpcs/{vpcId}
Delete a single VPC and all of its Subnets.
The User accessing this command 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.
{"errors":[{"field":"fieldname","reason":"fieldname must be a valid value"}]}
Responses
Delete request successful.
Delete request successful.
Error
errors
array
of objects
field
string
The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as “null” if the error is not specific to any single element of the request.
reason
string
What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to
open a Support Ticket or perform some other action before you can complete the request successfully.
{"created":"2023-07-11T00:00:00","description":"A description of my VPC.","id":123,"label":"cool-vpc","region":"us-east","subnets":[{"created":"2023-07-11T00:00:00","id":456,"ipv4":"10.0.1.0/24","label":"cool-vpc-subnet","linodes":[{"id":111,"interfaces":[{"active":true,"id":421}]}],"updated":"2023-09-11T00:00:00"}],"updated":"2023-09-11T00:00:00"}
{"created":"2023-07-11T00:00:00","description":"A description of my VPC.","id":123,"label":"cool-vpc","region":"us-east","subnets":[{"created":"2023-07-11T00:00:00","id":456,"ipv4":"10.0.1.0/24","label":"cool-vpc-subnet","linodes":[{"id":111,"interfaces":[{"active":true,"id":421}]}],"updated":"2023-09-11T00:00:00"}],"updated":"2023-09-11T00:00:00"}
{"errors":[{"field":"fieldname","reason":"fieldname must be a valid value"}]}
Responses
A VPC object.
created
string<date-time>
The date-time of VPC creation.
description
string
<=
255
characters
A written description to help distinguish the VPC.
id
integer
The unique ID of 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 (--).
region
string
The Region for the VPC.
subnets
array
of objects
A list of subnets associated with the VPC.
created
string<date-time>
The date-time of VPC Subnet creation.
id
integer
The unique ID of the VPC Subnet.
ipv4
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
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 (--).
linodes
array
of objects
An array of Linode IDs assigned to the VPC Subnet.
A Linode is assigned to a VPC Subnet if it has a Configuration Profile with a vpc purpose interface with the subnet’s subnet_id. Even if the Configuration Profile is not active, meaning the Linode does not have access to the Subnet, the Linode still appears in this array.
id
integer
ID of a Linode assigned to the VPC Subnet.
interfaces
array
of objects
An array of Interfaces assigned to the Linode.
active
boolean
Returns true if the Interface is in use, meaning that the Linode was powered on using the Configuration Profile to which the Interface belongs. Otherwise returns false.
id
integer
ID of the interface
updated
Nullable
string<date-time>
The date-time of the most recent VPC Subnet update.
updated
Nullable
string<date-time>
The date-time of the most recent VPC update.
A VPC object.
created
string<date-time>
The date-time of VPC creation.
description
string
<=
255
characters
A written description to help distinguish the VPC.
id
integer
The unique ID of 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 (--).
region
string
The Region for the VPC.
subnets
array
of objects
A list of subnets associated with the VPC.
created
string<date-time>
The date-time of VPC Subnet creation.
id
integer
The unique ID of the VPC Subnet.
ipv4
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
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 (--).
linodes
array
of objects
An array of Linode IDs assigned to the VPC Subnet.
A Linode is assigned to a VPC Subnet if it has a Configuration Profile with a vpc purpose interface with the subnet’s subnet_id. Even if the Configuration Profile is not active, meaning the Linode does not have access to the Subnet, the Linode still appears in this array.
id
integer
ID of a Linode assigned to the VPC Subnet.
interfaces
array
of objects
An array of Interfaces assigned to the Linode.
active
boolean
Returns true if the Interface is in use, meaning that the Linode was powered on using the Configuration Profile to which the Interface belongs. Otherwise returns false.
id
integer
ID of the interface
updated
Nullable
string<date-time>
The date-time of the most recent VPC Subnet update.
updated
Nullable
string<date-time>
The date-time of the most recent VPC update.
Error
errors
array
of objects
field
string
The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as “null” if the error is not specific to any single element of the request.
reason
string
What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to
open a Support Ticket or perform some other action before you can complete the request successfully.
VPC Update
PUT
https://api.linode.com/v4/vpcs/{vpcId}
Update an existing VPC.
The User accessing this command must have read_write grants to the VPC.
curl https://api.linode.com/v4/vpcs/$vpcId\
-H "Authorization: Bearer $TOKEN"\
-H "Content-Type: application/json"\
-X PUT -d '{
"description": "A description of my VPC.",
"label": "cool-vpc"
}'
curl https://api.linode.com/v4/vpcs/$vpcId\
-H "Authorization: Bearer $TOKEN"\
-H "Content-Type: application/json"\
-X PUT -d '{
"description": "A description of my VPC.",
"label": "cool-vpc"
}'
linode-cli vpcs update $vpcId\
--description "A description of my VPC." --label cool-vpc
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
{"created":"2023-07-11T00:00:00","description":"A description of my VPC.","id":123,"label":"cool-vpc","region":"us-east","subnets":[{"created":"2023-07-11T00:00:00","id":456,"ipv4":"10.0.1.0/24","label":"cool-vpc-subnet","linodes":[{"id":111,"interfaces":[{"active":true,"id":421}]}],"updated":"2023-09-11T00:00:00"}],"updated":"2023-09-11T00:00:00"}
{"created":"2023-07-11T00:00:00","description":"A description of my VPC.","id":123,"label":"cool-vpc","region":"us-east","subnets":[{"created":"2023-07-11T00:00:00","id":456,"ipv4":"10.0.1.0/24","label":"cool-vpc-subnet","linodes":[{"id":111,"interfaces":[{"active":true,"id":421}]}],"updated":"2023-09-11T00:00:00"}],"updated":"2023-09-11T00:00:00"}
{"errors":[{"field":"fieldname","reason":"fieldname must be a valid value"}]}
Responses
The updated VPC.
created
string<date-time>
The date-time of VPC creation.
description
string
<=
255
characters
A written description to help distinguish the VPC.
id
integer
The unique ID of 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 (--).
region
string
The Region for the VPC.
subnets
array
of objects
A list of subnets associated with the VPC.
created
string<date-time>
The date-time of VPC Subnet creation.
id
integer
The unique ID of the VPC Subnet.
ipv4
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
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 (--).
linodes
array
of objects
An array of Linode IDs assigned to the VPC Subnet.
A Linode is assigned to a VPC Subnet if it has a Configuration Profile with a vpc purpose interface with the subnet’s subnet_id. Even if the Configuration Profile is not active, meaning the Linode does not have access to the Subnet, the Linode still appears in this array.
id
integer
ID of a Linode assigned to the VPC Subnet.
interfaces
array
of objects
An array of Interfaces assigned to the Linode.
active
boolean
Returns true if the Interface is in use, meaning that the Linode was powered on using the Configuration Profile to which the Interface belongs. Otherwise returns false.
id
integer
ID of the interface
updated
Nullable
string<date-time>
The date-time of the most recent VPC Subnet update.
updated
Nullable
string<date-time>
The date-time of the most recent VPC update.
The updated VPC.
created
string<date-time>
The date-time of VPC creation.
description
string
<=
255
characters
A written description to help distinguish the VPC.
id
integer
The unique ID of 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 (--).
region
string
The Region for the VPC.
subnets
array
of objects
A list of subnets associated with the VPC.
created
string<date-time>
The date-time of VPC Subnet creation.
id
integer
The unique ID of the VPC Subnet.
ipv4
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
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 (--).
linodes
array
of objects
An array of Linode IDs assigned to the VPC Subnet.
A Linode is assigned to a VPC Subnet if it has a Configuration Profile with a vpc purpose interface with the subnet’s subnet_id. Even if the Configuration Profile is not active, meaning the Linode does not have access to the Subnet, the Linode still appears in this array.
id
integer
ID of a Linode assigned to the VPC Subnet.
interfaces
array
of objects
An array of Interfaces assigned to the Linode.
active
boolean
Returns true if the Interface is in use, meaning that the Linode was powered on using the Configuration Profile to which the Interface belongs. Otherwise returns false.
id
integer
ID of the interface
updated
Nullable
string<date-time>
The date-time of the most recent VPC Subnet update.
updated
Nullable
string<date-time>
The date-time of the most recent VPC update.
Error
errors
array
of objects
field
string
The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as “null” if the error is not specific to any single element of the request.
reason
string
What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to
open a Support Ticket or perform some other action before you can complete the request successfully.
VPC IP Addresses View
GET
https://api.linode.com/v4/vpcs/{vpcId}/ips
Returns a paginated list of IP addresses for a single VPC.
{"errors":[{"field":"fieldname","reason":"fieldname must be a valid value"}]}
Responses
The IP addresses for the requested VPC.
data
array
of objects
active
boolean
Returns true if the VPC interface is in use, meaning that the Linode was powered on using the config_id to which the interface belongs. Otherwise returns false.
address
Nullable
string<ip>
An IPv4 address configured for this VPC interface. Displayed as null if an address_range.
address_range
Nullable
string
A range of IPv4 addresses configured for this VPC interface. Displayed as null if a single address.
config_id
integer
The globally general entity identifier for the Linode configuration profile where the VPC is included.
gateway
Nullable
string<ip>
The default gateway for the VPC subnet that the IP or IP range belongs to.
interface_id
integer
The globally general API entity identifier for the Linode interface.
linode_id
integer
The identifier for the Linode the VPC interface currently belongs to.
nat_1_1
Nullable
string<ip>
The public IP address used for NAT 1:1 with the VPC. This is null if the VPC interface uses an address_range or NAT 1:1 isn’t used.
prefix
Nullable
integer
The number of bits set in the subnet_mask.
region
string
The region of the VPC.
subnet_id
integer
The id of the VPC Subnet for this interface.
subnet_mask
string<ip>
The mask that separates host bits from network bits for the address or address_range.
vpc_id
integer
The unique globally general API entity identifier for the VPC.
Returns true if the VPC interface is in use, meaning that the Linode was powered on using the config_id to which the interface belongs. Otherwise returns false.
address
Nullable
string<ip>
An IPv4 address configured for this VPC interface. Displayed as null if an address_range.
address_range
Nullable
string
A range of IPv4 addresses configured for this VPC interface. Displayed as null if a single address.
config_id
integer
The globally general entity identifier for the Linode configuration profile where the VPC is included.
gateway
Nullable
string<ip>
The default gateway for the VPC subnet that the IP or IP range belongs to.
interface_id
integer
The globally general API entity identifier for the Linode interface.
linode_id
integer
The identifier for the Linode the VPC interface currently belongs to.
nat_1_1
Nullable
string<ip>
The public IP address used for NAT 1:1 with the VPC. This is null if the VPC interface uses an address_range or NAT 1:1 isn’t used.
prefix
Nullable
integer
The number of bits set in the subnet_mask.
region
string
The region of the VPC.
subnet_id
integer
The id of the VPC Subnet for this interface.
subnet_mask
string<ip>
The mask that separates host bits from network bits for the address or address_range.
vpc_id
integer
The unique globally general API entity identifier for the VPC.
The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as “null” if the error is not specific to any single element of the request.
reason
string
What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to
open a Support Ticket or perform some other action before you can complete the request successfully.
VPC Subnets List
GET
https://api.linode.com/v4/vpcs/{vpcId}/subnets
Get information about all VPC Subnets associated with a VPC.
{"errors":[{"field":"fieldname","reason":"fieldname must be a valid value"}]}
Responses
A paginated list of VPC Subnet objects.
data
array
of objects
created
string<date-time>
The date-time of VPC Subnet creation.
id
integer
The unique ID of the VPC Subnet.
ipv4
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
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 (--).
linodes
array
of objects
An array of Linode IDs assigned to the VPC Subnet.
A Linode is assigned to a VPC Subnet if it has a Configuration Profile with a vpc purpose interface with the subnet’s subnet_id. Even if the Configuration Profile is not active, meaning the Linode does not have access to the Subnet, the Linode still appears in this array.
id
integer
ID of a Linode assigned to the VPC Subnet.
interfaces
array
of objects
An array of Interfaces assigned to the Linode.
active
boolean
Returns true if the Interface is in use, meaning that the Linode was powered on using the Configuration Profile to which the Interface belongs. Otherwise returns false.
id
integer
ID of the interface
updated
Nullable
string<date-time>
The date-time of the most recent VPC Subnet update.
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
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 (--).
linodes
array
of objects
An array of Linode IDs assigned to the VPC Subnet.
A Linode is assigned to a VPC Subnet if it has a Configuration Profile with a vpc purpose interface with the subnet’s subnet_id. Even if the Configuration Profile is not active, meaning the Linode does not have access to the Subnet, the Linode still appears in this array.
id
integer
ID of a Linode assigned to the VPC Subnet.
interfaces
array
of objects
An array of Interfaces assigned to the Linode.
active
boolean
Returns true if the Interface is in use, meaning that the Linode was powered on using the Configuration Profile to which the Interface belongs. Otherwise returns false.
id
integer
ID of the interface
updated
Nullable
string<date-time>
The date-time of the most recent VPC Subnet update.
The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as “null” if the error is not specific to any single element of the request.
reason
string
What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to
open a Support Ticket or perform some other action before you can complete the request successfully.
VPC Subnet Create
POST
https://api.linode.com/v4/vpcs/{vpcId}/subnets
Create a VPC Subnet.
The User accessing this command must have read_write grants to the VPC.
A successful request triggers a subnet_create event.
Once a VPC Subnet is created, it can be attached to a Linode by assigning the Subnet to one of the Linode’s Configuration Profile Interfaces. This step can be accomplished with the following commands:
{"errors":[{"field":"fieldname","reason":"fieldname must be a valid value"}]}
Responses
The new VPC Subnet.
created
string<date-time>
The date-time of VPC Subnet creation.
id
integer
The unique ID of the VPC Subnet.
ipv4
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
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 (--).
linodes
array
of objects
An array of Linode IDs assigned to the VPC Subnet.
A Linode is assigned to a VPC Subnet if it has a Configuration Profile with a vpc purpose interface with the subnet’s subnet_id. Even if the Configuration Profile is not active, meaning the Linode does not have access to the Subnet, the Linode still appears in this array.
id
integer
ID of a Linode assigned to the VPC Subnet.
interfaces
array
of objects
An array of Interfaces assigned to the Linode.
active
boolean
Returns true if the Interface is in use, meaning that the Linode was powered on using the Configuration Profile to which the Interface belongs. Otherwise returns false.
id
integer
ID of the interface
updated
Nullable
string<date-time>
The date-time of the most recent VPC Subnet update.
The new VPC Subnet.
created
string<date-time>
The date-time of VPC Subnet creation.
id
integer
The unique ID of the VPC Subnet.
ipv4
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
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 (--).
linodes
array
of objects
An array of Linode IDs assigned to the VPC Subnet.
A Linode is assigned to a VPC Subnet if it has a Configuration Profile with a vpc purpose interface with the subnet’s subnet_id. Even if the Configuration Profile is not active, meaning the Linode does not have access to the Subnet, the Linode still appears in this array.
id
integer
ID of a Linode assigned to the VPC Subnet.
interfaces
array
of objects
An array of Interfaces assigned to the Linode.
active
boolean
Returns true if the Interface is in use, meaning that the Linode was powered on using the Configuration Profile to which the Interface belongs. Otherwise returns false.
id
integer
ID of the interface
updated
Nullable
string<date-time>
The date-time of the most recent VPC Subnet update.
Error
errors
array
of objects
field
string
The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as “null” if the error is not specific to any single element of the request.
reason
string
What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to
open a Support Ticket or perform some other action before you can complete the request successfully.
The user accessing this command must have read_write grants to the VPC. A successful request triggers a subnet_delete event.
Note: You need to delete all the Configuration Profile Interfaces that this Subnet is assigned to before you can delete it. If those Interfaces are active, the associated Linode needs to be shut down before they can be removed.
{"errors":[{"field":"fieldname","reason":"fieldname must be a valid value"}]}
Responses
Delete request successful.
Delete request successful.
Error
errors
array
of objects
field
string
The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as “null” if the error is not specific to any single element of the request.
reason
string
What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to
open a Support Ticket or perform some other action before you can complete the request successfully.
VPC Subnet View
GET
https://api.linode.com/v4/vpcs/{vpcId}/subnets/{vpcSubnetId}
{"errors":[{"field":"fieldname","reason":"fieldname must be a valid value"}]}
Responses
A VPC Subnet object.
created
string<date-time>
The date-time of VPC Subnet creation.
id
integer
The unique ID of the VPC Subnet.
ipv4
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
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 (--).
linodes
array
of objects
An array of Linode IDs assigned to the VPC Subnet.
A Linode is assigned to a VPC Subnet if it has a Configuration Profile with a vpc purpose interface with the subnet’s subnet_id. Even if the Configuration Profile is not active, meaning the Linode does not have access to the Subnet, the Linode still appears in this array.
id
integer
ID of a Linode assigned to the VPC Subnet.
interfaces
array
of objects
An array of Interfaces assigned to the Linode.
active
boolean
Returns true if the Interface is in use, meaning that the Linode was powered on using the Configuration Profile to which the Interface belongs. Otherwise returns false.
id
integer
ID of the interface
updated
Nullable
string<date-time>
The date-time of the most recent VPC Subnet update.
A VPC Subnet object.
created
string<date-time>
The date-time of VPC Subnet creation.
id
integer
The unique ID of the VPC Subnet.
ipv4
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
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 (--).
linodes
array
of objects
An array of Linode IDs assigned to the VPC Subnet.
A Linode is assigned to a VPC Subnet if it has a Configuration Profile with a vpc purpose interface with the subnet’s subnet_id. Even if the Configuration Profile is not active, meaning the Linode does not have access to the Subnet, the Linode still appears in this array.
id
integer
ID of a Linode assigned to the VPC Subnet.
interfaces
array
of objects
An array of Interfaces assigned to the Linode.
active
boolean
Returns true if the Interface is in use, meaning that the Linode was powered on using the Configuration Profile to which the Interface belongs. Otherwise returns false.
id
integer
ID of the interface
updated
Nullable
string<date-time>
The date-time of the most recent VPC Subnet update.
Error
errors
array
of objects
field
string
The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as “null” if the error is not specific to any single element of the request.
reason
string
What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to
open a Support Ticket or perform some other action before you can complete the request successfully.
VPC Subnet Update
PUT
https://api.linode.com/v4/vpcs/{vpcId}/subnets/{vpcSubnetId}
Update a VPC Subnet.
The User accessing this command must have read_write grants to the VPC.
A successful request triggers a subnet_update event.
{"errors":[{"field":"fieldname","reason":"fieldname must be a valid value"}]}
Responses
The updated VPC Subnet.
created
string<date-time>
The date-time of VPC Subnet creation.
id
integer
The unique ID of the VPC Subnet.
ipv4
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
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 (--).
linodes
array
of objects
An array of Linode IDs assigned to the VPC Subnet.
A Linode is assigned to a VPC Subnet if it has a Configuration Profile with a vpc purpose interface with the subnet’s subnet_id. Even if the Configuration Profile is not active, meaning the Linode does not have access to the Subnet, the Linode still appears in this array.
id
integer
ID of a Linode assigned to the VPC Subnet.
interfaces
array
of objects
An array of Interfaces assigned to the Linode.
active
boolean
Returns true if the Interface is in use, meaning that the Linode was powered on using the Configuration Profile to which the Interface belongs. Otherwise returns false.
id
integer
ID of the interface
updated
Nullable
string<date-time>
The date-time of the most recent VPC Subnet update.
The updated VPC Subnet.
created
string<date-time>
The date-time of VPC Subnet creation.
id
integer
The unique ID of the VPC Subnet.
ipv4
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
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 (--).
linodes
array
of objects
An array of Linode IDs assigned to the VPC Subnet.
A Linode is assigned to a VPC Subnet if it has a Configuration Profile with a vpc purpose interface with the subnet’s subnet_id. Even if the Configuration Profile is not active, meaning the Linode does not have access to the Subnet, the Linode still appears in this array.
id
integer
ID of a Linode assigned to the VPC Subnet.
interfaces
array
of objects
An array of Interfaces assigned to the Linode.
active
boolean
Returns true if the Interface is in use, meaning that the Linode was powered on using the Configuration Profile to which the Interface belongs. Otherwise returns false.
id
integer
ID of the interface
updated
Nullable
string<date-time>
The date-time of the most recent VPC Subnet update.
Error
errors
array
of objects
field
string
The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as “null” if the error is not specific to any single element of the request.
reason
string
What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to
open a Support Ticket or perform some other action before you can complete the request successfully.
We use cookies to ensure the fast reliable and secure operation of this website, to improve your website experience, to enable certain social media interactions and to manage your cookie choices. Some cookies process personal identifiable information. By continuing to visit our websites you are agreeing to our use of cookies. Click “Manage Preferences” to make individual choices and get details on the cookies in use and the processing activities. You can access the Cookie Management Page at any time via the Cookie Settings link in the footer. For additional information relating to your privacy take a look at our Privacy Statement.