put
https://api.linode.com//vpcs/
Update an existing VPC. A successful request triggers a vpc_update event.
You can add, update, and delete IPv4 ranges (CIDRs) for an existing VPC. If ipv4 is omitted or null, existing ranges remain unchanged. If you're updating the VPC's IPv4 ranges, consider the following:
- All ranges must fall within RFC 1918 private address space (
10.0.0.0/8,172.16.0.0/12, or192.168.0.0/17). Non-private or public address ranges are rejected. - The array must contain at least one range. This array represents the desired final state of the VPC's IPv4 space.
- All ranges must be provided in canonical format with no host bits set. For example,
10.0.0.0/8is valid, but10.1.0.0/8is rejected. - Ranges must be fully aggregated. Overlapping ranges or sub-ranges already contained within a larger prefix are not allowed. For example, you can't provide both
10.0.0.0/8and10.1.0.0/24. - Ranges can't overlap with restricted infrastructure ranges defined in
forbidden_ipv4_ranges(such as192.168.128.0/17). - The system automatically sorts the IPv4 ranges using standard Python network sorting logic: primary sort is by network address, then by prefix length.
- Removal of ranges is only permitted if all existing subnets remain fully contained within the new range set.
- A change of IPv4 ranges for a VPC with Linodes is subject to a 15-minute cooldown measured from the last VPC update.
To update a VPC's subnet, run the Update a VPC subnet operation.
Permissions and scopes
To call this operation, you need the following:
-
Identity and access permissions. Your user needs a role with these permissions assigned. Learn more.
- Permissions:
update_vpc
- Permissions:
-
OAuth scopes. Your user needs these scopes assigned. Learn more.
- Scopes:
vpc:read_write
- Scopes:
CLI
linode-cli vpcs update $vpcId \
--description "A description of my VPC." \
--label myvpc \
--ipv4 '[{"range": "10.0.0.0/16"}]'