Skip to content

Commit 4681975

Browse files
committed
Added nodebalancer entity type to Firewall commands
1 parent ad9a8d2 commit 4681975

File tree

1 file changed

+85
-38
lines changed

1 file changed

+85
-38
lines changed

openapi.yaml

Lines changed: 85 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -7685,7 +7685,7 @@ paths:
76857685
parameters:
76867686
- name: linodeId
76877687
in: path
7688-
description: ID of the Linode to look up.
7688+
description: ID of the Linode to access.
76897689
required: true
76907690
schema:
76917691
type: integer
@@ -7699,16 +7699,16 @@ paths:
76997699
- Linode Instances
77007700
summary: Firewalls List
77017701
description: >
7702-
View Firewall information for Firewalls associated with this Linode.
7702+
View Firewall information for Firewalls assigned to this Linode.
77037703
operationId: getLinodeFirewalls
7704-
x-linode-cli-action: firewalls-list
7704+
x-linode-cli-action: firewalls
77057705
security:
77067706
- personalAccessToken: []
77077707
- oauth:
77087708
- linodes:read_only
77097709
responses:
77107710
'200':
7711-
description: Returns a paginated list of Firewalls associated with this Linode.
7711+
description: Returns a paginated list of Firewalls assigned to this Linode.
77127712
content:
77137713
application/json:
77147714
schema:
@@ -12969,11 +12969,11 @@ paths:
1296912969
* Use the `rules` property to create inbound and outbound access rules.
1297012970

1297112971
* Use the `devices` property to assign the Firewall to a service and apply its Rules to the device. Requires `read_write` [User's Grants](/docs/api/account/#users-grants-view) to the device.
12972-
Currently, Firewalls can only be assigned to Linode instances.
12972+
Currently, Firewalls can be assigned to Linode compute instances and NodeBalancers.
1297312973

12974-
* A Firewall can be assigned to multiple Linode instances at a time.
12974+
* A Firewall can be assigned to multiple services at a time.
1297512975

12976-
* A Linode instance can have one active, assigned Firewall at a time.
12976+
* A service can have one active, assigned Firewall at a time.
1297712977
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.
1297812978

1297912979
* A `firewall_create` Event is generated when this endpoint returns successfully.
@@ -12984,7 +12984,7 @@ paths:
1298412984
- oauth:
1298512985
- firewall:read_write
1298612986
requestBody:
12987-
description: Creates a Firewall object that can be applied to a Linode service to filter the service's network traffic.
12987+
description: Creates a Firewall object that can be applied to a service to filter the service's network traffic.
1298812988
content:
1298912989
application/json:
1299012990
schema:
@@ -12999,7 +12999,9 @@ paths:
1299912999
description: |
1300013000
Devices to create for this Firewall.
1300113001
When a Device is created, the Firewall is assigned to its associated service.
13002-
Currently, Devices can only be created for Linode instances.
13002+
Currently, Devices can be created for Linode compute instances and NodeBalancers.
13003+
13004+
Additional devices can be assigned after Firewall creation by using the [Firewall Device Create](#firewall-device-create) command.
1300313005
properties:
1300413006
linodes:
1300513007
description: >
@@ -13010,6 +13012,17 @@ paths:
1301013012
example:
1301113013
- 123
1301213014
- 456
13015+
nodebalancers:
13016+
description: |
13017+
An array containing a NodeBalancer ID. A Firewall Device is created for the ID.
13018+
13019+
* Only one NodeBalancer can be assigned to a Firewall at a time.
13020+
* Firewalls only apply to inbound TCP traffic to NodeBalancers.
13021+
type: array
13022+
items:
13023+
type: integer
13024+
example:
13025+
- 321
1301313026
rules:
1301413027
required:
1301513028
- inbound_policy
@@ -13081,8 +13094,12 @@ paths:
1308113094
},
1308213095
"devices": {
1308313096
"linodes": [
13084-
123
13085-
]
13097+
123,
13098+
456
13099+
],
13100+
"nodebalancers": [
13101+
321
13102+
]
1308613103
},
1308713104
"tags": [
1308813105
"example tag",
@@ -13158,7 +13175,7 @@ paths:
1315813175
- A Firewall's Devices cannot be set with this endpoint. Instead, use the
1315913176
[Create Firewall Device](/docs/api/networking/#firewall-device-create)
1316013177
and [Delete Firewall Device](/docs/api/networking/#firewall-device-delete)
13161-
endpoints to assign and remove this Firewall from Linode services.
13178+
endpoints to assign and remove this Firewall from services.
1316213179

1316313180
- A Firewall's Rules cannot be changed with this endpoint. Instead, use the
1316413181
[Update Firewall Rules](/docs/api/networking/#firewall-rules-update)
@@ -13238,8 +13255,8 @@ paths:
1323813255
- oauth:
1323913256
- firewall:read_write
1324013257
description: |
13241-
Delete a Firewall resource by its ID. This will remove all of the Firewall's Rules
13242-
from any Linode services that the Firewall was assigned to.
13258+
Delete a Firewall resource by its ID. This removes all of the Firewall's Rules
13259+
from any services that the Firewall was assigned to.
1324313260

1324413261
A `firewall_delete` Event is generated when this endpoint returns successfully.
1324513262
responses:
@@ -13282,9 +13299,7 @@ paths:
1328213299
- $ref: '#/components/parameters/pageSize'
1328313300
summary: Firewall Devices List
1328413301
description: |
13285-
Returns a paginated list of a Firewall's Devices. A Firewall Device assigns a
13286-
Firewall to a Linode service (referred to as the Device's `entity`). Currently,
13287-
only Devices with an entity of type `linode` are accepted.
13302+
Returns a paginated list of a Firewall's Devices. A Firewall Device assigns a Firewall to a service (referred to as the Device's `entity`).
1328813303
operationId: getFirewallDevices
1328913304
x-linode-cli-action: devices-list
1329013305
security:
@@ -13303,6 +13318,29 @@ paths:
1330313318
type: array
1330413319
items:
1330513320
$ref: '#/components/schemas/FirewallDevices'
13321+
example:
13322+
- {
13323+
"created": "2018-01-01T00:01:01",
13324+
"entity": {
13325+
"id": 123,
13326+
"label": "my-linode",
13327+
"type": "linode",
13328+
"url": "/v4/linode/instances/123"
13329+
},
13330+
"id": 456,
13331+
"updated": "2018-01-02T00:01:01"
13332+
}
13333+
- {
13334+
"created": "2018-01-01T00:01:01",
13335+
"entity": {
13336+
"id": 321,
13337+
"label": "my-nodebalancer",
13338+
"type": "nodebalancer",
13339+
"url": "/v4/nodebalancers/123"
13340+
},
13341+
"id": 654,
13342+
"updated": "2018-01-02T00:01:01"
13343+
}
1330613344
page:
1330713345
$ref: '#/components/schemas/PaginationEnvelope/properties/page'
1330813346
pages:
@@ -13330,11 +13368,13 @@ paths:
1333013368
Creates a Firewall Device, which assigns a Firewall to a service (referred to
1333113369
as the Device's `entity`) and applies the Firewall's Rules to the device.
1333213370

13333-
* Currently, only Devices with an entity of type `linode` are accepted.
13371+
* Currently, Devices with `linode` and `nodebalancer` entity types are accepted.
13372+
13373+
* Firewalls only apply to inbound TCP traffic to NodeBalancers.
1333413374

13335-
* A Firewall can be assigned to multiple Linode instances at a time.
13375+
* A Firewall can be assigned to multiple services at a time.
1333613376

13337-
* A Linode instance can have one active, assigned Firewall at a time.
13377+
* A service can have one active, assigned Firewall at a time.
1333813378
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.
1333913379

1334013380
* A `firewall_device_add` Event is generated when the Firewall Device is added successfully.
@@ -13404,8 +13444,7 @@ paths:
1340413444
summary: Firewall Device View
1340513445
description: |
1340613446
Returns information for a Firewall Device, which assigns a Firewall
13407-
to a Linode service (referred to as the Device's `entity`). Currently,
13408-
only Devices with an entity of type `linode` are accepted.
13447+
to a service (referred to as the Device's `entity`).
1340913448
operationId: getFirewallDevice
1341013449
x-linode-cli-action: device-view
1341113450
security:
@@ -13444,10 +13483,10 @@ paths:
1344413483
- oauth:
1344513484
- firewall:read_write
1344613485
description: |
13447-
Removes a Firewall Device, which removes a Firewall from the Linode service it was
13448-
assigned to by the Device. This will remove all of the Firewall's Rules from the Linode
13449-
service. If any other Firewalls have been assigned to the Linode service, then those Rules
13450-
will remain in effect.
13486+
Removes a Firewall Device, which removes a Firewall from the service it was
13487+
assigned to by the Device. This removes all of the Firewall's Rules from the
13488+
service. If any other Firewalls have been assigned to the service, then those Rules
13489+
remain in effect.
1345113490

1345213491
A `firewall_device_remove` Event is generated when the Firewall Device is removed successfully.
1345313492
responses:
@@ -13760,6 +13799,13 @@ paths:
1376013799
$ref: '#/components/schemas/NodeBalancer/properties/label'
1376113800
client_conn_throttle:
1376213801
$ref: '#/components/schemas/NodeBalancer/properties/client_conn_throttle'
13802+
firewall_id:
13803+
type: integer
13804+
description: |
13805+
The ID of the Firewall to assign to the NodeBalancer.
13806+
13807+
* Only one NodeBalancer can be assigned to a Firewall at a time.
13808+
* Firewalls only apply to inbound TCP traffic to NodeBalancers.
1376313809
configs:
1376413810
type: array
1376513811
description: |
@@ -14701,15 +14747,15 @@ paths:
1470114747
- NodeBalancers
1470214748
summary: Firewalls List
1470314749
description: >
14704-
View Firewall information for Firewalls associated with this NodeBalancer.
14705-
x-linode-cli-action: firewalls-list
14750+
View information for Firewalls assigned to this NodeBalancer.
14751+
x-linode-cli-action: firewalls
1470614752
security:
1470714753
- personalAccessToken: []
1470814754
- oauth:
1470914755
- nodebalancers:read_only
1471014756
responses:
1471114757
'200':
14712-
description: Returns a paginated list of Firewalls associated with this NodeBalancer.
14758+
description: Returns a paginated list of Firewalls assigned to this NodeBalancer.
1471314759
content:
1471414760
application/json:
1471514761
schema:
@@ -14726,11 +14772,11 @@ paths:
1472614772
x-code-samples:
1472714773
- lang: Shell
1472814774
source: >
14729-
curl -H "Authorization: Bearer $TOKEN" \
14730-
https://api.linode.com/v4/nodebalancers/12345/firewalls
14775+
curl https://api.linode.com/v4/nodebalancers/$nodeBalancerId/firewalls \
14776+
-H "Authorization: Bearer $TOKEN"
1473114777
- lang: CLI
1473214778
source: >
14733-
linode-cli nodebalancers firewalls-list 12345
14779+
linode-cli nodebalancers firewalls $nodeBalancerId
1473414780
/nodebalancers/{nodeBalancerId}/stats:
1473514781
x-linode-cli-command: nodebalancers
1473614782
parameters:
@@ -20830,9 +20876,9 @@ components:
2083020876
Firewall:
2083120877
type: object
2083220878
description: >
20833-
A resource that controls incoming and outgoing network traffic to a Linode service. Only one Firewall can be attached to a Linode at any given time.
20879+
A resource that controls incoming and outgoing network traffic to a compute service. Only one enabled Firewall can be attached to a particular service at any given time.
2083420880
[Create a Firewall Device](/docs/api/networking/#firewall-create)
20835-
to assign a Firewall to a Linode service. Currently, Firewalls can only be assigned to Linode instances.
20881+
to assign a Firewall to a service. Currently, Firewalls can assigned to Linode compute instances and NodeBalancers.
2083620882
properties:
2083720883
id:
2083820884
x-linode-filterable: true
@@ -21015,8 +21061,8 @@ components:
2101521061
FirewallDevices:
2101621062
type: object
2101721063
description: >
21018-
Associates a Firewall with a Linode service. A Firewall can be assigned
21019-
to a single Linode service at a time. Additional disabled Firewalls can be
21064+
Associates a Firewall with a Linode or NodeBalancer service. A Firewall can be assigned
21065+
to a single entity at a time. Additional disabled Firewalls can be
2102021066
assigned to a service, but they cannot be enabled if another active Firewall
2102121067
is already assigned to the same service.
2102221068
properties:
@@ -21049,7 +21095,7 @@ components:
2104921095
type: object
2105021096
readOnly: true
2105121097
description: >
21052-
The Linode service that this Firewall has been applied to.
21098+
The compute service that this Firewall has been applied to.
2105321099
properties:
2105421100
id:
2105521101
description: The entity's ID
@@ -21060,6 +21106,7 @@ components:
2106021106
type: string
2106121107
enum:
2106221108
- linode
21109+
- nodebalancer
2106321110
example: linode
2106421111
label:
2106521112
description: The entity's label.
@@ -21068,7 +21115,7 @@ components:
2106821115
example: my-linode
2106921116
url:
2107021117
description: >
21071-
The URL you can use to access this entity.
21118+
The API URL path you can use to access this entity.
2107221119
type: string
2107321120
format: url
2107421121
readOnly: true

0 commit comments

Comments
 (0)