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
/v1/workspaces/{wid}/vpcsSearch VPCs in a workspaceLists the VPCs in a workspace, with pagination.
Path parameters
| Name | Type | Description |
|---|---|---|
wid | integer | Workspace ID |
Query parameters
| Name | Type | Description |
|---|---|---|
q | string | Quick search by name or ID |
id | integer[] | Filter to specific VPC IDs |
name | string | Filter by name |
description | string | Filter by description |
Plus the shared pagination parameters. Returns a paged list of VPC objects.
Create a VPC
/v1/workspaces/{wid}/vpcsCreate a VPCCreates a new VPC. Responds 201 Created with the VPC object.
Path parameters
| Name | Type | Description |
|---|---|---|
wid | integer | Workspace ID |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Display name, 4 to 32 characters |
description | string | yes | Description, up to 240 characters |
range | string | yes | Private CIDR for address allocation, for example 10.0.0.0/24. Must be an RFC 1918 range. |
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
/v1/vpcs/{vid}Fetch VPC detailsPath parameters
| Name | Type | Description |
|---|---|---|
vid | integer | VPC ID |
Returns the full VPC object, including the normalized range and assigned VLAN tag.
Update a VPC
/v1/vpcs/{vid}Update a VPCUpdates the name or description of a VPC. Every field is optional; send only what you are changing.
Path parameters
| Name | Type | Description |
|---|---|---|
vid | integer | VPC ID |
Request body
| Field | Type | Description |
|---|---|---|
name | string | New name, 4 to 32 characters |
description | string | New description, up to 240 characters |
Returns the updated VPC object.
Delete a VPC
/v1/vpcs/{vid}Delete a VPCDeletes the VPC. Fails with 400 if any instance is still attached.
Path parameters
| Name | Type | Description |
|---|---|---|
vid | integer | VPC ID |
Returns an audit log entry.
List instances in a VPC
/v1/vpcs/{vid}/instancesList instances attached to a VPCReturns the instances currently attached to the VPC, with pagination.
Path parameters
| Name | Type | Description |
|---|---|---|
vid | integer | VPC ID |
Query parameters
| Name | Type | Description |
|---|---|---|
q | string | Quick 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
/v1/instances/{iid}/vpcsList VPCs attached to an instanceReturns the VPCs currently attached to an instance, with pagination.
Path parameters
| Name | Type | Description |
|---|---|---|
iid | integer | Instance ID |
Query parameters
| Name | Type | Description |
|---|---|---|
q | string | Quick 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
/v1/instances/{iid}/vpcsAttach a VPC to an instanceAttaches 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
| Name | Type | Description |
|---|---|---|
iid | integer | Instance ID |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
vpc | integer | yes | VPC 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
/v1/instances/{iid}/vpcs/{vid}Detach a VPC from an instanceRemoves the attachment between an instance and a VPC, freeing the private address.
Path parameters
| Name | Type | Description |
|---|---|---|
iid | integer | Instance ID |
vid | integer | VPC ID |
Returns an audit log entry.