Subnets
All operations require authentication.
List subnetsProduction
Returns the subnets of the network.
Path parameters
Network ID
Project ID
Headers
Pagination cursor
Pagination size
Response
Computed hash representing the current target specification value
Creation date of the subnet
Current state of the subnet
Ongoing asynchronous tasks related to the subnet
Unique identifier of the subnet
Subnet readiness in the system
CREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATINGLast target specification of the subnet
Last update date of the subnet
Example uses networkId = 00000000-0000-0000-0000-000000000000, projectId = string
$ curl https:/ / api.eu.ovhcloud.com/ v2/ publicCloud/ project/ {projectId}/ network/ {networkId}/ subnet \
-H "authorization: Bearer $OVH_TOKEN"[ { "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "allocationPools": [ { "end": "192.0.2.0", "start": "192.0.2.0" } ], "cidr": "192.0.2.0/24", "description": "string", "dhcpEnabled": true, "dnsNameservers": [ "string" ], "gatewayIp": "192.0.2.0", "hostRoutes": [ { "destination": "192.0.2.0/24", "nextHop": "192.0.2.0" } ], "location": { "availabilityZone": "string", "region": "string" }, "name": "string" }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "allocationPools": [ { "end": "192.0.2.0", "start": "192.0.2.0" } ], "cidr": "192.0.2.0/24", "description": "string", "dhcpEnabled": true, "dnsNameservers": [ "string" ], "gatewayIp": "192.0.2.0", "hostRoutes": [ { "destination": "192.0.2.0/24", "nextHop": "192.0.2.0" } ], "location": { "availabilityZone": "string", "region": "string" }, "name": "string" }, "updatedAt": "2024-01-01T12:00:00Z" }]
Get a subnetProduction
Returns the subnet, including its gateway IP and allocation pools.
Path parameters
Network ID
Project ID
Subnet ID
Response
Computed hash representing the current target specification value
Creation date of the subnet
Current state of the subnet
Ongoing asynchronous tasks related to the subnet
Unique identifier of the subnet
Subnet readiness in the system
CREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATINGLast target specification of the subnet
Last update date of the subnet
Example uses networkId = 00000000-0000-0000-0000-000000000000, projectId = string, subnetId = 00000000-0000-0000-0000-000000000000
$ curl https:/ / api.eu.ovhcloud.com/ v2/ publicCloud/ project/ {projectId}/ network/ {networkId}/ subnet/ {subnetId} \
-H "authorization: Bearer $OVH_TOKEN"{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "allocationPools": [ { "end": "192.0.2.0", "start": "192.0.2.0" } ], "cidr": "192.0.2.0/24", "description": "string", "dhcpEnabled": true, "dnsNameservers": [ "string" ], "gatewayIp": "192.0.2.0", "hostRoutes": [ { "destination": "192.0.2.0/24", "nextHop": "192.0.2.0" } ], "location": { "availabilityZone": "string", "region": "string" }, "name": "string" }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "allocationPools": [ { "end": "192.0.2.0", "start": "192.0.2.0" } ], "cidr": "192.0.2.0/24", "description": "string", "dhcpEnabled": true, "dnsNameservers": [ "string" ], "gatewayIp": "192.0.2.0", "hostRoutes": [ { "destination": "192.0.2.0/24", "nextHop": "192.0.2.0" } ], "location": { "availabilityZone": "string", "region": "string" }, "name": "string" }, "updatedAt": "2024-01-01T12:00:00Z"}
Create a subnetProduction
Creates a subnet within the network's address space. The CIDR is immutable after creation.
Path parameters
Network ID
Project ID
Request body (required)
Desired target specification for the subnet to create
Response
Computed hash representing the current target specification value
Creation date of the subnet
Current state of the subnet
Ongoing asynchronous tasks related to the subnet
Unique identifier of the subnet
Subnet readiness in the system
CREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATINGLast target specification of the subnet
Last update date of the subnet
Example uses networkId = 00000000-0000-0000-0000-000000000000, projectId = string
$ curl https:/ / api.eu.ovhcloud.com/ v2/ publicCloud/ project/ {projectId}/ network/ {networkId}/ subnet \
-H "authorization: Bearer $OVH_TOKEN"{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "allocationPools": [ { "end": "192.0.2.0", "start": "192.0.2.0" } ], "cidr": "192.0.2.0/24", "description": "string", "dhcpEnabled": true, "dnsNameservers": [ "string" ], "gatewayIp": "192.0.2.0", "hostRoutes": [ { "destination": "192.0.2.0/24", "nextHop": "192.0.2.0" } ], "location": { "availabilityZone": "string", "region": "string" }, "name": "string" }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "allocationPools": [ { "end": "192.0.2.0", "start": "192.0.2.0" } ], "cidr": "192.0.2.0/24", "description": "string", "dhcpEnabled": true, "dnsNameservers": [ "string" ], "gatewayIp": "192.0.2.0", "hostRoutes": [ { "destination": "192.0.2.0/24", "nextHop": "192.0.2.0" } ], "location": { "availabilityZone": "string", "region": "string" }, "name": "string" }, "updatedAt": "2024-01-01T12:00:00Z"}
Delete a subnetProduction
Deletes the subnet.
Path parameters
Network ID
Project ID
Subnet ID
Response
Computed hash representing the current target specification value
Creation date of the subnet
Current state of the subnet
Ongoing asynchronous tasks related to the subnet
Unique identifier of the subnet
Subnet readiness in the system
CREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATINGLast target specification of the subnet
Last update date of the subnet
Example uses networkId = 00000000-0000-0000-0000-000000000000, projectId = string, subnetId = 00000000-0000-0000-0000-000000000000
$ curl https:/ / api.eu.ovhcloud.com/ v2/ publicCloud/ project/ {projectId}/ network/ {networkId}/ subnet/ {subnetId} \
-H "authorization: Bearer $OVH_TOKEN"{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "allocationPools": [ { "end": "192.0.2.0", "start": "192.0.2.0" } ], "cidr": "192.0.2.0/24", "description": "string", "dhcpEnabled": true, "dnsNameservers": [ "string" ], "gatewayIp": "192.0.2.0", "hostRoutes": [ { "destination": "192.0.2.0/24", "nextHop": "192.0.2.0" } ], "location": { "availabilityZone": "string", "region": "string" }, "name": "string" }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "allocationPools": [ { "end": "192.0.2.0", "start": "192.0.2.0" } ], "cidr": "192.0.2.0/24", "description": "string", "dhcpEnabled": true, "dnsNameservers": [ "string" ], "gatewayIp": "192.0.2.0", "hostRoutes": [ { "destination": "192.0.2.0/24", "nextHop": "192.0.2.0" } ], "location": { "availabilityZone": "string", "region": "string" }, "name": "string" }, "updatedAt": "2024-01-01T12:00:00Z"}
Update a subnetProduction
Updates the subnet's name, description, DHCP, DNS nameservers, gateway or allocation pools. The CIDR is immutable.
Path parameters
Network ID
Project ID
Subnet ID
Request body (required)
Optional concurrency-control checksum. When supplied, it must match the resource's current checksum or the request is rejected with a 409 checksum-mismatch conflict. When omitted or empty, the concurrency check is skipped and the write is forced (last-write-wins).
Desired target specification for the subnet
Response
Computed hash representing the current target specification value
Creation date of the subnet
Current state of the subnet
Ongoing asynchronous tasks related to the subnet
Unique identifier of the subnet
Subnet readiness in the system
CREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATINGLast target specification of the subnet
Last update date of the subnet
Example uses networkId = 00000000-0000-0000-0000-000000000000, projectId = string, subnetId = 00000000-0000-0000-0000-000000000000
$ curl https:/ / api.eu.ovhcloud.com/ v2/ publicCloud/ project/ {projectId}/ network/ {networkId}/ subnet/ {subnetId} \
-H "authorization: Bearer $OVH_TOKEN"{ "checksum": "string", "createdAt": "2024-01-01T12:00:00Z", "currentState": { "allocationPools": [ { "end": "192.0.2.0", "start": "192.0.2.0" } ], "cidr": "192.0.2.0/24", "description": "string", "dhcpEnabled": true, "dnsNameservers": [ "string" ], "gatewayIp": "192.0.2.0", "hostRoutes": [ { "destination": "192.0.2.0/24", "nextHop": "192.0.2.0" } ], "location": { "availabilityZone": "string", "region": "string" }, "name": "string" }, "currentTasks": [ { "errors": [ { "message": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "link": "string", "status": "ERROR", "type": "string" } ], "id": "00000000-0000-0000-0000-000000000000", "resourceStatus": "CREATING", "targetSpec": { "allocationPools": [ { "end": "192.0.2.0", "start": "192.0.2.0" } ], "cidr": "192.0.2.0/24", "description": "string", "dhcpEnabled": true, "dnsNameservers": [ "string" ], "gatewayIp": "192.0.2.0", "hostRoutes": [ { "destination": "192.0.2.0/24", "nextHop": "192.0.2.0" } ], "location": { "availabilityZone": "string", "region": "string" }, "name": "string" }, "updatedAt": "2024-01-01T12:00:00Z"}