Networking
Firewall Devices List
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
ID of the Firewall to access.
Query Parameters
The page of a collection to return.
The number of items to return per page.
Request Samples
- Shell
- CLI
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/networking/firewalls/123/devices
Response Samples
- 200
- default
{
"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
The Device's unique ID
When this Device was created.
The Linode service that this Firewall has been applied to.
The entity's ID
The entity's label.
The entity's type.
The URL you can use to access this entity.
When this Device was last updated.
The current page.
The total number of pages.
The total number of results.
default: Error
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.
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
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
ID of the Firewall to access.
Request Body Schema
The entity's ID
The entity's type.
Request Samples
- Shell
- CLI
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
- 200
- default
{
"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.
When this Device was created.
When this Device was last updated.
The Device's unique ID
The Linode service that this Firewall has been applied to.
The entity's ID
The entity's type.
The entity's label.
The URL you can use to access this entity.
default: Error
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.
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.