ByCloud Docs
GuidesCLIAPISDK
patch/v1/subnets/{subnet_id}

Update subnet

Update a subnet

Path Parameters

subnet_id

string<uuid>required

path

Subnet ID

Example: "550e8400-e29b-41d4-a716-446655440000"

Request Body

required

Content-Type: application/json

name

stringoptional

description

stringoptional

gateway_ip

stringoptional

nullable

dns_nameservers

arrayoptional

allocation_pools

arrayoptional

host_routes

arrayoptional

enable_dhcp

booleanoptional

tags

arrayoptional

Responses

200

Subnet updated

Content-Type: application/json

subnet

objectoptional
400

Invalid request parameters

Content-Type: application/json

error

objectrequired
401

Authentication required or token invalid

Content-Type: application/json

error

objectrequired
404

Resource not found

Content-Type: application/json

error

objectrequired
500

Internal server error

Content-Type: application/json

error

objectrequired
curl -X PATCH "https://api.spo1.mycloud.com/v1/subnets/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"description": "string",
"gateway_ip": "string",
"dns_nameservers": [
"string"
],
"allocation_pools": [
{
"start": "192.168.1.100",
"end": "192.168.1.200"
}
],
"host_routes": [
{
"destination": "10.0.0.0/8",
"nexthop": "192.168.1.1"
}
],
"enable_dhcp": true,
"tags": [
"web",
"frontend"
]
}'