Skip to navigation

Attach a VM to a firewall group

Applies a firewall group’s rules to a VM. Requires scope: firewall.write.

# Example request with curl (set IBEE_API_TOKEN to a platform API token and WORKSPACE_ID to the workspace first).
# FIREWALL_GROUP_ID: Firewall group ID
curl -X POST "https://api.ibee.ai/v1/networking/firewall-groups/$FIREWALL_GROUP_ID/attachments?workspace_id=$WORKSPACE_ID" \
-H "Authorization: Bearer $IBEE_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"vm_id": "<vm_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

firewall_group_idstringRequired
Firewall group 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.

Response

VM attached successfully.
firewall_group_idstring
Unique ID of the group.
organization_idstring
ID of the owning organization.
workspace_idstring
ID of the owning workspace.
namestring
Display name of the group.
is_defaultboolean
Whether this is the workspace's default group.
statusstring

Status of the group; active when usable.

ruleslist of objects
Rules in the group.
created_atdatetime

When the resource was created (ISO 8601).

updated_atdatetime

When the resource was last changed (ISO 8601).

workspace_namestringOptional
Display name of the workspace.
descriptionstring or nullOptional
Description of the group.
linked_instance_countintegerOptional>=0
Number of VMs the group is attached to.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found 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