Skip to content

VPCs

A VPC (Virtual Private Cloud) is a private Layer 2 network isolated to your workspace. Each VPC has a CIDR range from which the platform automatically allocates an address when you attach an instance. Attaching a VPC adds a second NIC to the instance; detaching removes it. A VPC cannot be deleted while any instance is attached.

VPC names must be 4 to 32 characters. The range must be an RFC 1918 private CIDR; the platform normalizes it to the network address automatically.

See Workspaces and scope and Pagination for shared conventions.

Search VPCs

GET/v1/workspaces/{wid}/vpcsSearch VPCs in a workspace

Lists the VPCs in a workspace, with pagination.

Path parameters

NameTypeDescription
widintegerWorkspace ID

Query parameters

NameTypeDescription
qstringQuick search by name or ID
idinteger[]Filter to specific VPC IDs
namestringFilter by name
descriptionstringFilter by description

Plus the shared pagination parameters. Returns a paged list of VPC objects.

Create a VPC

POST/v1/workspaces/{wid}/vpcsCreate a VPC

Creates a new VPC. Responds 201 Created with the VPC object.

Path parameters

NameTypeDescription
widintegerWorkspace ID

Request body

FieldTypeRequiredDescription
namestringyesDisplay name, 4 to 32 characters
descriptionstringyesDescription, up to 240 characters
rangestringyesPrivate CIDR for address allocation, for example 10.0.0.0/24. Must be an RFC 1918 range.
bash
curl -X POST https://api.galaxygate.net/v1/workspaces/42/vpcs \
  -H "Authorization: Bearer $GALAXYGATE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "backend-net",
    "description": "Internal backend network",
    "range": "10.10.0.0/24"
  }'

Returns the created VPC object.

Fetch a VPC

GET/v1/vpcs/{vid}Fetch VPC details

Path parameters

NameTypeDescription
vidintegerVPC ID

Returns the full VPC object, including the normalized range and assigned VLAN tag.

Update a VPC

PATCH/v1/vpcs/{vid}Update a VPC

Updates the name or description of a VPC. Every field is optional; send only what you are changing.

Path parameters

NameTypeDescription
vidintegerVPC ID

Request body

FieldTypeDescription
namestringNew name, 4 to 32 characters
descriptionstringNew description, up to 240 characters

Returns the updated VPC object.

Delete a VPC

DELETE/v1/vpcs/{vid}Delete a VPC

Deletes the VPC. Fails with 400 if any instance is still attached.

Path parameters

NameTypeDescription
vidintegerVPC ID

Returns an audit log entry.

List instances in a VPC

GET/v1/vpcs/{vid}/instancesList instances attached to a VPC

Returns the instances currently attached to the VPC, with pagination.

Path parameters

NameTypeDescription
vidintegerVPC ID

Query parameters

NameTypeDescription
qstringQuick search by instance name or ID

Plus the shared pagination parameters. Returns a paged list of VPC-instance membership objects, each carrying the instance summary and the private IP address assigned within the VPC.

List VPCs attached to an instance

GET/v1/instances/{iid}/vpcsList VPCs attached to an instance

Returns the VPCs currently attached to an instance, with pagination.

Path parameters

NameTypeDescription
iidintegerInstance ID

Query parameters

NameTypeDescription
qstringQuick search by VPC name or ID

Plus the shared pagination parameters. Returns a paged list of VPC-instance membership objects.

Attach a VPC to an instance

POST/v1/instances/{iid}/vpcsAttach a VPC to an instance

Attaches a VPC to an instance and automatically allocates a private address from the VPC range. Both the instance and the VPC must belong to the same workspace. Responds 201 Created.

Path parameters

NameTypeDescription
iidintegerInstance ID

Request body

FieldTypeRequiredDescription
vpcintegeryesVPC ID to attach

Returns an audit log entry. The new NIC is available inside the guest on the next boot, or immediately if the instance supports hot-plug.

Detach a VPC from an instance

DELETE/v1/instances/{iid}/vpcs/{vid}Detach a VPC from an instance

Removes the attachment between an instance and a VPC, freeing the private address.

Path parameters

NameTypeDescription
iidintegerInstance ID
vidintegerVPC ID

Returns an audit log entry.