GET /virtual_machines/:virtual_machine_id/firewall_rules

Gets list of firewall rules assigned to specified VS

Sections

Response Parameters

position – the rule priority

address* – the IP address for which this rule is active. If none is specified, all IPs will be subject to this rule.

created_at – the date when the record in DB was created

command – the action which will be performed with the IP specified by the address parameter

updated_at – the date when the record was updated in DB

port – the port for which this rule is active. If the field is empty, the rule will apply to all ports

protocol – the IP protocol (TCP or UDP)for which this rule is active

id – the ID of this record

network_interface_id – the ID of a network interface for which this rule is active

JSON Request example

 GET /virtual_machines/:virtual_machine_id/firewall_rules.json

JSON Response

 [
    {
        "firewall_rule": {
            "address": "192.167.0.1/32",
            "command": "ACCEPT",
            "created_at": "2015-08-28T01:08:14+00:00",
            "description": null,
            "destination_ip": null,
            "enable_logging": null,
            "enabled": null,
            "firewall_service_id": null,
            "id": 208,
            "identifier": "km6g9y4ltckeeu",
            "network_interface_id": 509,
            "port": "22",
            "position": 1,
            "protocol": "TCP",
            "source_port": null,
            "updated_at": "2015-08-28T01:08:14+00:00"
        }
    }
]

XML Request example

 GET /virtual_machines/:virtual_machine_id/firewall_rules.xml

XML Response example

 <?xml version="1.0" encoding="UTF-8"?>
<firewall_rules>
<firewall_rule>
<position>1</position>
<address> </address>
<created_at>2011-04-20T12:52:10+03:00</created_at>
<command>ACCEPT</command>
<updated_at>2011-04-20T12:52:10+03:00</updated_at>
<port>21</port>
<protocol>TCP</protocol>
<id>1</id>
<network_interface_id>5</network_interface_id>
</firewall_rule>
</firewall_rules>