Skip to content

VPC Subnets

Configure VPC subnets and attach instances to them

Read more

create-subnet

Create a Subnet

POST /vpc/{vpc-id}/subnet

Path parameters

NameInDescription
vpc-idpathMust be a valid UUID.

Request body

Content-Type: application/json

PropertyTypeRequiredDescription
address-spacestringyesWhether the subnet is private or public

Allowed values: private.
addressfamilystringyesWhether the subnet supports IPv4 and/or IPv6

Allowed values: inet4.
namestringyesSubnet name, up to 255 characters. Must be unique between the subnet of the parent VPC

Min length: 1. Max length: 255.
descriptionstringnoMax length: 4096.
ipv4-blockstringnoSubnet ipv4 CIDR. Must not overlap with other CIDRs of this VPC
labelsobjectno
Example
{
  "address-space": "private",
  "addressfamily": "inet4",
  "description": "string",
  "ipv4-block": "string",
  "labels": {},
  "name": "string"
}

Responses

Status: 200 - 200

Content-Type: application/json

PropertyTypeDescription
idstringOperation ID

Must be a valid UUID.
messagestringOperation message
reasonstringOperation failure reason

Allowed values: incorrect, unknown, unavailable, forbidden, busy, fault, partial, not-found, interrupted, unsupported, conflict.
referenceReferenceRelated resource reference
statestringOperation status

Allowed values: failure, pending, success, timeout.
Example output
{
  "id": "a1b2c3d4-e5f6-4a5b-8c9d-0123456789ab",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "a1b2c3d4-e5f6-4a5b-8c9d-0123456789ab",
    "link": "string"
  },
  "state": "failure"
}

SDK reference for create-subnet: golang | Python | Java

CLI: exo api create-subnet

get-subnet

Retrieve Subnet details

GET /vpc/{vpc-id}/subnet/{id}

Path parameters

NameInDescription
vpc-idpathMust be a valid UUID.
idpathMust be a valid UUID.

Responses

Status: 200 - 200

Content-Type: application/json

PropertyTypeDescription
address-spacestringWhether the subnet is private or public

Allowed values: private.
addressfamilystringWhether the subnet support IPv4 and/or IPv6

Allowed values: inet4, dual.
created-atstringISO 8601 date-time.
descriptionstringMax length: 4096.
idstringMust be a valid UUID.
instancesarray of InstancesInstances attached to the subnet
ipv4-blockstringSubnet ipv4 CIDR
labelsobject
namestringMin length: 1. Max length: 255.
Example output
{
  "address-space": "private",
  "addressfamily": "inet4",
  "created-at": "2026-01-01T00:00:00Z",
  "description": "string",
  "id": "a1b2c3d4-e5f6-4a5b-8c9d-0123456789ab",
  "instances": [
    {
      "id": "a1b2c3d4-e5f6-4a5b-8c9d-0123456789ab",
      "ipv4": "192.0.2.10",
      "name": "string"
    }
  ],
  "ipv4-block": "string",
  "labels": {},
  "name": "string"
}

SDK reference for get-subnet: golang | Python | Java

CLI: exo api get-subnet

update-subnet

Update a Subnet

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

Path parameters

NameInDescription
vpc-idpathMust be a valid UUID.
idpathMust be a valid UUID.

Request body

Content-Type: application/json

PropertyTypeRequiredDescription
descriptionstringnoMax length: 4096.
labelsobjectno
namestringnoMin length: 1. Max length: 255.
Example
{
  "description": "string",
  "labels": {},
  "name": "string"
}

Responses

Status: 200 - 200

Content-Type: application/json

PropertyTypeDescription
address-spacestringWhether the subnet is private or public

Allowed values: private.
addressfamilystringWhether the subnet support IPv4 and/or IPv6

Allowed values: inet4, dual.
created-atstringISO 8601 date-time.
descriptionstringMax length: 4096.
idstringMust be a valid UUID.
instancesarray of InstancesInstances attached to the subnet
ipv4-blockstringSubnet ipv4 CIDR
labelsobject
namestringMin length: 1. Max length: 255.
Example output
{
  "address-space": "private",
  "addressfamily": "inet4",
  "created-at": "2026-01-01T00:00:00Z",
  "description": "string",
  "id": "a1b2c3d4-e5f6-4a5b-8c9d-0123456789ab",
  "instances": [
    {
      "id": "a1b2c3d4-e5f6-4a5b-8c9d-0123456789ab",
      "ipv4": "192.0.2.10",
      "name": "string"
    }
  ],
  "ipv4-block": "string",
  "labels": {},
  "name": "string"
}

SDK reference for update-subnet: golang | Python | Java

CLI: exo api update-subnet

delete-subnet

Delete a Subnet

DELETE /vpc/{vpc-id}/subnet/{id}

Path parameters

NameInDescription
vpc-idpathMust be a valid UUID.
idpathMust be a valid UUID.

Responses

Status: 204 - 204

SDK reference for delete-subnet: golang | Python | Java

CLI: exo api delete-subnet


Other Operations

detach-instance-from-subnet

Detach a Compute instance from a Subnet

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

Path parameters

NameInDescription
vpc-idpathMust be a valid UUID.
subnet-idpathMust be a valid UUID.

Request body

Content-Type: application/json

PropertyTypeRequiredDescription
instanceTarget InstanceyesThe target instance to detach
Example
{
  "instance": {
    "id": "a1b2c3d4-e5f6-4a5b-8c9d-0123456789ab"
  }
}

Responses

Status: 200 - 200

Content-Type: application/json

PropertyTypeDescription
idstringOperation ID

Must be a valid UUID.
messagestringOperation message
reasonstringOperation failure reason

Allowed values: incorrect, unknown, unavailable, forbidden, busy, fault, partial, not-found, interrupted, unsupported, conflict.
referenceReferenceRelated resource reference
statestringOperation status

Allowed values: failure, pending, success, timeout.
Example output
{
  "id": "a1b2c3d4-e5f6-4a5b-8c9d-0123456789ab",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "a1b2c3d4-e5f6-4a5b-8c9d-0123456789ab",
    "link": "string"
  },
  "state": "failure"
}

SDK reference for detach-instance-from-subnet: golang | Python | Java

CLI: exo api detach-instance-from-subnet

attach-instance-to-subnet

Attach a Compute instance to a Subnet

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

Path parameters

NameInDescription
vpc-idpathMust be a valid UUID.
subnet-idpathMust be a valid UUID.

Request body

Content-Type: application/json

PropertyTypeRequiredDescription
instanceTarget InstanceyesThe target instance to attach
ipv4stringnoAn optional IPv4 address assign to the instance

Must be a valid IPv4 address.
Example
{
  "instance": {
    "id": "a1b2c3d4-e5f6-4a5b-8c9d-0123456789ab"
  },
  "ipv4": "192.0.2.10"
}

Responses

Status: 200 - 200

Content-Type: application/json

PropertyTypeDescription
idstringOperation ID

Must be a valid UUID.
messagestringOperation message
reasonstringOperation failure reason

Allowed values: incorrect, unknown, unavailable, forbidden, busy, fault, partial, not-found, interrupted, unsupported, conflict.
referenceReferenceRelated resource reference
statestringOperation status

Allowed values: failure, pending, success, timeout.
Example output
{
  "id": "a1b2c3d4-e5f6-4a5b-8c9d-0123456789ab",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "a1b2c3d4-e5f6-4a5b-8c9d-0123456789ab",
    "link": "string"
  },
  "state": "failure"
}

SDK reference for attach-instance-to-subnet: golang | Python | Java

CLI: exo api attach-instance-to-subnet

list-subnets

List Subnets

GET /vpc/{vpc-id}/subnet

Path parameters

NameInDescription
vpc-idpathMust be a valid UUID.

Responses

Status: 200 - 200

Content-Type: application/json

PropertyTypeDescription
subnetsarray of Subnet
Example output
{
  "subnets": [
    {
      "address-space": "private",
      "addressfamily": "inet4",
      "created-at": "2026-01-01T00:00:00Z",
      "description": "string",
      "id": "a1b2c3d4-e5f6-4a5b-8c9d-0123456789ab",
      "ipv4-block": "string",
      "labels": {},
      "name": "string"
    }
  ]
}

SDK reference for list-subnets: golang | Python | Java

CLI: exo api list-subnets

Last updated on