Security rule
This subsection is focused on virtual machines and enables the configuration of Firewall policy rules for VMs.
Create rule
POST {{BASE_URL}}/api/security-rules
Create a firewall policy rule for a specific virtual machine.
Headers
Name
Type
Description
Authorization*
String
Bearer Token
Request Body
Name
Type
Description
data*
Object
{
"_id": "6549fdb370c99a149c7919f4",
"virtualMachine": "6549fc8570c99a149c79193f",
"direction": "Inbound",
"name": "SSH",
"description": "",
"createdAt": "2023-11-07T09:04:51.342Z",
"updatedAt": "2023-11-07T09:04:51.342Z"
}Get rules
GET {{BASE_URL}}/api/virtual-machines/{id}/security-rules
Get firewall policy rules for a specific virtual machine.
Path Parameters
Name
Type
Description
id*
String
VM ID
Headers
Name
Type
Description
Authorization*
String
Bearer Token
[
{
"_id": "6549fcb270c99a149c791978",
"portRange": [
"22"
],
"source": "*",
"cidrBlock": "0.0.0.0/0",
"protocol": "Tcp",
"rule": "6549fcb270c99a149c791978",
"virtualMachine": "6549fc8570c99a149c79193f",
"direction": "Inbound",
"name": "AllowAnySSHInbound",
"createdAt": "2023-11-07T09:00:34.142Z",
"updatedAt": "2023-11-07T09:00:34.142Z"
}
]Delete rule
DELETE {{BASE_URL}}/api/security-rules/{id}
Delete a firewall policy rule.
Path Parameters
Name
Type
Description
id*
String
Rule ID
Headers
Name
Type
Description
Authorization*
String
Bearer Token
{"message":"ok"}Last updated
Was this helpful?