Firewall rules API


Create a firewall rule

POST /firewalls/:firewall/rules

Parameters

source
required: false
Firewall ID or CIDR range of source
port_range
required: false
Port or range for the rule
protocol
required: false
Protocol 'tcp' or 'udp'

Request

          Accept: application/json
          Content-Type: application/json
          
            
          {
            "firewall_rule": {
              "port_range": "0-65535",
              "protocol": "tcp"
            }
          }
            
          

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "request": {
              "type": "provision_firewall_rule",
              "id": "06b4c6a0-73f3-4b6f-9334-ca25ba9eedd5",
              "created_at": "2017-10-10T16:00:45+00:00",
              "started_at": "2017-10-10T16:00:45+00:00",
              "finished_at": "2017-10-10T16:00:45+00:00",
              "message": null,
              "request_status": "Finished: Provision firewall rule (06b4c6a0-73f3-4b6f-9334-ca25ba9eedd5) (less than a minute ago)",
              "successful": true,
              "updated_at": "2017-10-10T16:00:45+00:00",
              "read_channel": null,
              "stage": "create",
              "dependencies": "https://api.engineyard.com/requests/06b4c6a0-73f3-4b6f-9334-ca25ba9eedd5/dependencies",
              "stages": "https://api.engineyard.com/requests/06b4c6a0-73f3-4b6f-9334-ca25ba9eedd5/stages",
              "account": "https://api.engineyard.com/accounts/a3ed61ba-cf29-4b50-9a1f-fbddb6c39ac7",
              "requester": "https://api.engineyard.com/requests/06b4c6a0-73f3-4b6f-9334-ca25ba9eedd5/requester",
              "messages": "https://api.engineyard.com/requests/06b4c6a0-73f3-4b6f-9334-ca25ba9eedd5/messages",
              "callback_url": "https://api.engineyard.com/requests/06b4c6a0-73f3-4b6f-9334-ca25ba9eedd5/callback",
              "progress": false,
              "resource": "https://api.engineyard.com/firewall-rules/201"
            }
          }
            
          








Create a firewall with another firewall as the source

POST /firewalls/:firewall/rules

Parameters

source
required: false
Firewall ID or CIDR range of source
port_range
required: false
Port or range for the rule
protocol
required: false
Protocol 'tcp' or 'udp'

Request

          Accept: application/json
          Content-Type: application/json
          
            
          {
            "firewall_rule": {
              "port_range": "0-65535",
              "source": 63
            }
          }
            
          

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "request": {
              "type": "provision_firewall_rule",
              "id": "42da04ce-809d-4de8-a012-d0db7db3b70b",
              "created_at": "2017-10-10T16:01:09+00:00",
              "started_at": "2017-10-10T16:01:09+00:00",
              "finished_at": "2017-10-10T16:01:09+00:00",
              "message": null,
              "request_status": "Finished: Provision firewall rule (42da04ce-809d-4de8-a012-d0db7db3b70b) (less than a minute ago)",
              "successful": true,
              "updated_at": "2017-10-10T16:01:09+00:00",
              "read_channel": null,
              "stage": "create",
              "dependencies": "https://api.engineyard.com/requests/42da04ce-809d-4de8-a012-d0db7db3b70b/dependencies",
              "stages": "https://api.engineyard.com/requests/42da04ce-809d-4de8-a012-d0db7db3b70b/stages",
              "account": "https://api.engineyard.com/accounts/383a1b29-1302-4e32-98dc-f94ffb9f2574",
              "requester": "https://api.engineyard.com/requests/42da04ce-809d-4de8-a012-d0db7db3b70b/requester",
              "messages": "https://api.engineyard.com/requests/42da04ce-809d-4de8-a012-d0db7db3b70b/messages",
              "callback_url": "https://api.engineyard.com/requests/42da04ce-809d-4de8-a012-d0db7db3b70b/callback",
              "progress": false,
              "resource": "https://api.engineyard.com/firewall-rules/212"
            }
          }
            
          








Delete a firewall

DELETE /firewall-rules/:firewall_rule

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "request": {
              "type": "deprovision_firewall_rule",
              "id": "3b480e56-d47b-4b3b-838b-7f62890ef4a0",
              "created_at": "2017-10-10T16:01:23+00:00",
              "started_at": "2017-10-10T16:01:23+00:00",
              "finished_at": "2017-10-10T16:01:23+00:00",
              "message": null,
              "request_status": "Finished: Deprovision firewall rule (3b480e56-d47b-4b3b-838b-7f62890ef4a0) (less than a minute ago)",
              "successful": true,
              "updated_at": "2017-10-10T16:01:23+00:00",
              "read_channel": null,
              "stage": "cleanup",
              "dependencies": "https://api.engineyard.com/requests/3b480e56-d47b-4b3b-838b-7f62890ef4a0/dependencies",
              "stages": "https://api.engineyard.com/requests/3b480e56-d47b-4b3b-838b-7f62890ef4a0/stages",
              "account": "https://api.engineyard.com/accounts/9a87d013-85ed-4b68-bd3a-c80a225f5333",
              "requester": "https://api.engineyard.com/requests/3b480e56-d47b-4b3b-838b-7f62890ef4a0/requester",
              "messages": "https://api.engineyard.com/requests/3b480e56-d47b-4b3b-838b-7f62890ef4a0/messages",
              "callback_url": "https://api.engineyard.com/requests/3b480e56-d47b-4b3b-838b-7f62890ef4a0/callback",
              "progress": false,
              "resource": "https://api.engineyard.com/firewall-rules/218"
            }
          }