Networking

Preview — pending review

This reference is generated from the platform API contract and is still under review. Operations, fields, and descriptions can change before publication.

Update a subnet

PATCH
/scopes/{scopeId}/network/networks/{networkId}/subnets/{subnetId}

Applies a partial update to a subnet of the given network ("Save subnet" in the the network detail page subnet editor). Mutable fields are the subnet name, CIDR, gateway IP, DHCP flag and per-subnet DNS nameservers; only fields present in the body are changed and the updated Subnet resource is returned for in-place table refresh. Validation: subnet must exist under the given network else 404 NOT_FOUND (also 404 when networkId itself is unknown); a new cidr must remain inside the network address space, not overlap sibling subnets, and still contain every fixed IP already assigned to ports — violations map to 409 CONFLICT; gatewayIp must lie inside the (possibly new) CIDR else 422 VALIDATION_FAILED; dnsNameservers entries must be valid IP literals else 422; name must stay unique within the network else 409 CONFLICT. Async & state: Synchronous (200); the control-plane write completes inline and no transitional state exists. A resource.updated SSE frame for the parent network (kind: network, patch: {subnets}) is emitted so other sessions converge. Errors: 401 unauthenticated; 403 caller lacks contributor rights; 404 unknown networkId/subnetId; 409 CONFLICT on CIDR overlap, in-use fixed IPs or duplicate name; 412 PRECONDITION_FAILED on stale If-Match; 422 on field validation failure; 500 on apply failure. Idempotency/Concurrency: This operation does not use Idempotency-Key; it may be omitted and a sent one is ignored. A repeated identical PATCH re-applies the same fields (same end state) and records another network.subnet.update audit Operation. The precondition is the parent network's ETag, computed from its subnets, so resending a request that already changed the subnet with its original If-Match gets 412. If-Match with the detail-read ETag is honored — a mismatch returns 412 and leaves the subnet unchanged.

Authorization

bearerToken
headerAuthorizationBearer <token>

An API token (pc_live_…) or a service-account key (sak_live_…), created in Identity & Access Management and sent as Authorization: Bearer <token>. Requests are rate limited per credential and per tenant: every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset, and a refused request gets 429 RATE_LIMITED with Retry-After.

Path Parameters

scopeId*string

Opaque ownership+authorization scope resolving to tenant + subscription + project.

networkId*string

Identifier of the virtual network within the scope.

subnetId*string

Identifier of the subnet within the virtual network.

Header Parameters

If-Match?string

ETag for optimistic concurrency on mutations/deletes; mismatch results in 412.

Request Body

application/json
  1. body

Partial subnet update ("Save subnet"). Only present fields are changed.

name?string

New subnet name.

Match^[^\p{C}\p{Z}\x{10000}-\x{10FFFF}](?:[^\p{C}\p{Zl}\p{Zp}\x{10000}-\x{10FFFF}]*[^\p{C}\p{Z}\x{10000}-\x{10FFFF}])?$
Length1 <= length <= 255
cidr?string
gatewayIp?string
disableGateway?boolean

Set true to remove the subnet's gateway (Neutron gateway_ip=null); mutually exclusive with gatewayIp.

dhcpEnabled?boolean
dnsNameservers?array<string>
hostRoutes?array<>

Full-replacement list of static host routes; an empty array clears all routes.

allocationPools?array<>

Full-replacement list of DHCP allocation pools; an empty array resets the subnet to Neutron's default (CIDR-derived) pool.

Response Body

Subnet updated; returns the refreshed resource.

application/json
  1. response

Subnet of a virtual network, including its DHCP allocation pool.

id*string
name*string
cidr*string

Subnet CIDR, e.g. 10.0.1.0/24.

ipVersion*integer

IP protocol version of the subnet.

Value in46
gatewayIp*|

Gateway IP of the subnet; null when the gateway is disabled.

dhcpEnabled*boolean
allocationStart*string

First IP of the first DHCP allocation pool (convenience mirror of allocationPools[0].start).

allocationEnd*string

Last IP of the first DHCP allocation pool (convenience mirror of allocationPools[0].end).

dnsNameservers*array<string>
hostRoutes*array<>

Static host routes configured on the subnet (DHCP option 121).

allocationPools*array<>

DHCP allocation pools (the address ranges Neutron hands out); empty when the subnet has no pool.

curl -X PATCH "https://example.com/scopes/string/network/networks/string/subnets/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "name": "string",  "cidr": "string",  "ipVersion": 4,  "gatewayIp": "string",  "dhcpEnabled": true,  "allocationStart": "string",  "allocationEnd": "string",  "dnsNameservers": [    "string"  ],  "hostRoutes": [    {      "destination": "string",      "nexthop": "string"    }  ],  "allocationPools": [    {      "start": "string",      "end": "string"    }  ]}