Skip to navigation

Attach a node to a VPC

Attaches a VM to a VPC subnet so it can reach other VMs on the private network, optionally with a reserved public IP. Requires scope: network.write.

# Example request with curl (set IBEE_API_TOKEN to a platform API token and WORKSPACE_ID to the workspace first).
# VPC_ID: VPC ID
curl -X POST "https://api.ibee.ai/v1/networking/vpcs/$VPC_ID/nodes?workspace_id=$WORKSPACE_ID" \
-H "Authorization: Bearer $IBEE_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"vm_id": "<vm_id>", "subnet_id": "<subnet_id>"}'

Authentication

AuthorizationBearer

IBEE platform API token. Production tokens start with ibee_prod_key_; development tokens start with ibee_dev_key_. Use a token only with its matching gateway environment.

Path parameters

vpc_idstringRequired
VPC ID.

Query parameters

workspace_idstringRequiredformat: "^[1-9][0-9]*$">=1 character

The positive numeric workspace ID to scope this request to. Zero, negative, and non-numeric values are rejected.

Request

This endpoint expects an object.
vm_idstringRequired
ID of the VM to attach.
subnet_idstringRequired
Subnet of the VPC to attach the VM to.
connectivityenumOptionalDefaults to private

How the VM reaches the internet from this subnet.

  • private: no internet path.
  • public_ip: a Reserved IP is attached to the allocation.
  • nat: outbound traffic goes through the VPC’s NAT gateway.

Default private.

Allowed values:
requested_private_ipstringOptional
Private IPv4 address to give the VM in the subnet. Chosen automatically when omitted.
reserved_public_ip_idstring or nullOptional

Reserved IP to attach to the VM. Only valid with public_ip connectivity.

Response

Node attached successfully.
allocation_idstring
Unique ID of the attachment.
vpc_idstring
VPC the VM is attached to.
subnet_idstring
Subnet the VM is attached to.
vm_idstring
ID of the attached VM.
connectivityenum

How the VM reaches the internet from this subnet.

  • private: no internet path.
  • public_ip: a Reserved IP is attached to the allocation.
  • nat: outbound traffic goes through the VPC’s NAT gateway.
Allowed values:
private_ipstring
Private IPv4 address assigned to the VM.
prefix_lengthinteger
Prefix length of the subnet.
subnet_maskstring

Subnet mask in dotted-decimal form.

gatewaystring
Gateway IPv4 address of the subnet.
dnslist of strings
DNS resolvers handed to the VM.
statusstring

Attachment state: reserved, attaching, attached, moving, detaching or releasing.

public_ip_idstring or nullOptional

Reserved IP attached to the allocation, when connectivity is public_ip.

public_ipstring or nullOptional
Address of that Reserved IP.
nat_gateway_idstring or nullOptional

NAT gateway used, when connectivity is nat.

nat_public_ipstring or nullOptional
Public address of that NAT gateway.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
413
Content Too Large Error
422
Unprocessable Entity Error
423
Locked Error
429
Too Many Requests Error
500
Internal Server Error
502
Bad Gateway Error
503
Service Unavailable Error
504
Gateway Timeout Error