---
title: "[BETA] Update a Subnet"
method: PUT
path: "/vpc/{vpc-id}/subnet/{id}"
tags: ["vpc-subnet"]
---

# \[BETA\] Update a Subnet

`PUT /vpc/{vpc-id}/subnet/{id}`

## Request

- Base URL: `https://api-ch-gva-2.exoscale.com/v2`
- URL: `https://api-ch-gva-2.exoscale.com/v2/vpc/{vpc-id}/subnet/{id}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/exoscale/apis/exoscale-api/docs/vpc/:vpc-id/subnet/:id/put.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `vpc-id` string, uuid, required
- `id` string, uuid, required

## Request body

- object
  - `name` string, nullable: Subnet name
  - `description` string, nullable: Subnet description
  - `labels` Labels
  - `ipv4-block` string, nullable: Subnet CIDR

## Response `200`

200

- Subnet: Subnet
  - `description` string: Subnet description
  - `labels` Labels
  - `name` string: Subnet name
  - `ipv4-block` string: Subnet ipv4 CIDR
  - `addressfamily` 'inet4' | 'dual': Subnet address family
  - `address-space` 'private': Subnet address space
  - `instances` object[]: Instances attached to the subnet
    - `id` string, uuid: Instance uuid
    - `ipv4` string, ipv4: Instance Ipv4 address
  - `id` string, uuid: Subnet ID
  - `created-at` string, date-time: Subnet creation date

## Changes

- **2026-11-06** `63da6f74c845`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/exoscale/apis/exoscale-api/changes/vpc/:vpc-id/subnet/:id/put.md)

---

[API](https://skmtc.dev/exoscale/apis/exoscale-api.md) - [All operations](https://skmtc.dev/exoscale/apis/exoscale-api/llms.txt) - [OpenAPI document](https://skmtc.dev/exoscale/apis/exoscale-api/revisions/63da6f74c845?raw)
