Networking

Firewall Devices List

get
https://api.linode.com/v4/networking/firewalls/{firewallId}/devices

Returns a paginated list of a Firewall's Devices. A Firewall Device assigns a Firewall to a Linode service (referred to as the Device's entity). Currently, only Devices with an entity of type linode are accepted.

Path Parameters

firewallId
Required
integer

ID of the Firewall to access.

Query Parameters

page
integer > = 1
Default: 1

The page of a collection to return.

page_size
integer [25 .. 500]
Default: 100

The number of items to return per page.

Request Samples

curl -H "Authorization: Bearer $TOKEN" \
    https://api.linode.com/v4/networking/firewalls/123/devices

Response Samples

{
  "data": [
    {
      "id": "",
      "created": "2018-01-01T00:01:01",
      "entity": {
        "id": 123,
        "label": "my-linode",
        "type": "linode",
        "url": "/v4/linode/instances/123"
      },
      "updated": "2018-01-02T00:01:01"
    }
  ],
  "page": 1,
  "pages": 1,
  "results": 1
}

Responses

200: A paginated list of Firewall Devices

data
array of objects
id
Filterable
integer

The Device's unique ID

created
Filterable
string

When this Device was created.

entity
object

The Linode service that this Firewall has been applied to.

id
integer

The entity's ID

label
string

The entity's label.

type
string
Enum: "linode"

The entity's type.

url
string

The URL you can use to access this entity.

updated
Filterable
string

When this Device was last updated.

page
integer

The current page.

pages
integer

The total number of pages.

results
integer

The total number of results.

default: Error

errors
array of objects
reason
string

What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to open a Support Ticket or perform some other action before you can complete the request successfully.

field
string

The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as "null" if the error is not specific to any single element of the request.

Firewall Device Create

post
https://api.linode.com/v4/networking/firewalls/{firewallId}/devices

Creates a Firewall Device, which assigns a Firewall to a service (referred to as the Device's entity) and applies the Firewall's Rules to the device.

  • Currently, only Devices with an entity of type linode are accepted.

  • A Firewall can be assigned to multiple Linode instances at a time.

  • A Linode instance can have one active, assigned Firewall at a time. Additional disabled Firewalls can be assigned to a service, but they cannot be enabled if another active Firewall is already assigned to the same service.

  • A firewall_device_add Event is generated when the Firewall Device is added successfully.

Path Parameters

firewallId
Required
integer

ID of the Firewall to access.

Request Body Schema

id
Required
integer

The entity's ID

type
Required
string

The entity's type.

Request Samples

curl -H "Content-Type: application/json" \
    -H "Authorization: Bearer $TOKEN" \
    -X POST -d '{
      "type": "linode",
      "id": 123
    }' \
    https://api.linode.com/v4/networking/firewalls/123/devices

Response Samples

{
  "created": "2018-01-01T00:01:01",
  "updated": "2018-01-02T00:01:01",
  "id": 1234,
  "entity": {
    "id": 123,
    "type": "linode",
    "label": "my-linode",
    "url": "/v4/linode/instances/123"
  }
}

Responses

200: Returns information about the created Firewall Device.

created
Filterable
string <date-time>

When this Device was created.

updated
Filterable
string <date-time>

When this Device was last updated.

id
Filterable
integer

The Device's unique ID

entity
object

The Linode service that this Firewall has been applied to.

id
integer

The entity's ID

type
string
Enum: "linode"

The entity's type.

label
string

The entity's label.

url
string

The URL you can use to access this entity.

default: Error

errors
array of objects
reason
string

What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to open a Support Ticket or perform some other action before you can complete the request successfully.

field
string

The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as "null" if the error is not specific to any single element of the request.