v12

latestOpenAPI 3.0.3raw.githubusercontent.com2026-06-1811583196.1 KB
Networking

Attach security group to VM NIC

Attach a security group to a specific network interface on a VM. The security group's rules apply to inbound and outbound traffic on that NIC.

Use nic_id from GET /api/v1/vms/{id}/networks to target a specific interface.

post/api/v1/vms/{id}/security-groups

Path parameters

idstring uuid required

VM ID (UUID)

Headers

X-Project-IDstring uuid required

Project ID. Required for all mutating operations (create, delete, power actions, resize).

Request body

security_group_idstring uuid required

Security group to attach.

nic_idinteger required

NIC to attach the security group to. Get from GET /api/v1/vms/{id}/networks.

Response

Security group attached

successboolean
messagestring

Example response

{
  "success": true,
  "message": "Operation completed successfully"
}