pydo.vpc_subnets.create()
Generated on 1 Oct 2026
from pydo version
v0.43.0
Usage
client.vpc_subnets.create(
vpc_uuid="997615ce-132d-4bae-9270-9ee21b395e5d",
body={
"name": "new-subnet",
"ip_range": "10.20.0.0/16",
},
)Description
To create a subnet within a VPC, send a POST request to
/v2/vpcs/{vpc_uuid}/subnets with a name and, optionally, an IP range.
Parameters
vpc_uuidstring requiredThe unique identifier of the VPC to which the subnet belongs.
namestring requiredExample:
new-subnetThe human-readable name of the VPC subnet.
ip_rangestring optionalExample:
10.20.0.0/16An RFC1918 CIDR range between /16 and /24 that does not overlap another team or VPC network.
Request Sample
Response Example
More Information
See /v2/vpcs/{vpc_uuid}/subnets in the API reference for additional detail on responses, headers, parameters, and more.