Create a VM firewall rule
Adds an inbound/outbound rule, or attaches a project security group (type=group).
Authorization
bearerAuth API key created in the portal (Settings → API Keys). Send as Authorization: Bearer <key>.
In: header
Path Parameters
Project UUID.
VM identifier (VMID).
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Create or update a VM firewall rule, or attach a security group.
Response Body
application/json
curl -X POST "https://example.com/cloud/project/string/vm/0/firewall/rules/" \ -H "Content-Type: application/json" \ -d '{ "type": "in", "action": "string", "enable": true }'{ "message": "string"}