Update a VPC

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, or 192.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/8 is valid, but 10.1.0.0/8 is 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/8 and 10.1.0.0/24.
  • Ranges can't overlap with restricted infrastructure ranges defined in forbidden_ipv4_ranges (such as 192.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
  • OAuth scopes. Your user needs these scopes assigned. Learn more.

    • Scopes: vpc:read_write

CLI

linode-cli vpcs update $vpcId \
  --description "A description of my VPC." \
  --label myvpc \
  --ipv4 '[{"range": "10.0.0.0/16"}]'

Learn more

Path Params
string
enum
required

Enum Call either the v4 URL, or v4beta for operations still in Beta.

Allowed:
integer
required

The id of the VPC.

Body Params

A VPC Update request object.

string
length ≤ 255

A written description to help distinguish the VPC.

ipv4
array of objects | null

The IPv4 ranges belonging to this VPC.

  • When creating a VPC, if ipv4 is null or omitted, the system applies the VPC's default ranges.
  • When updating a VPC, if ipv4 is null or omitted, existing ranges remain unchanged.
  • If provided, the array must contain at least one range.
  • All ranges must fall within RFC 1918 private address space (10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/17).
  • A single VPC can be configured with a maximum of 30 distinct IPv4 ranges.
  • Ranges can be defined with a prefix length anywhere from /8 to /30.
  • Ranges must be unique and must not overlap with restricted ranges defined in forbidden_ipv4_ranges (such as 192.168.128.0/17).
  • Ranges must be provided in canonical format with no host bits set. For example, 10.0.0.0/8 is valid, but 10.1.0.0/8 is 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/8 and 10.1.0.0/24.
  • All subnet ranges must be contained within these VPC IPv4 ranges.
  • Changing the ranges for a VPC with Linodes is subject to a 15-minute cooldown measured from the last VPC update.
ipv4
string
length between 1 and 64

Filterable 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 (--).
Responses

Language
Credentials
LoadingLoading…
Response
Choose an example:
application/json