NodeBalancers v4.176.0
List node balancers
Returns a paginated list of NodeBalancers you have access to.
OAuth.
nodebalancers:read_only
Authorizations
personalAccessToken | |
oauth | nodebalancers:read_only |
Query Parameters
page |
The page of a collection to return. |
page_size |
The number of items to return per page. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/nodebalancers
linode-cli nodebalancers list
Response Samples
{
"data": [
{
"client_conn_throttle": 0,
"created": "2018-01-01T00:01:01",
"host": "192.0.2.1.ip.linodeusercontent.com",
"id": 12345,
"ipv4": "203.0.113.1",
"ipv6": null,
"label": "balancer12345",
"region": "us-east",
"tags": [
"example tag",
"another example"
],
"transfer": {
"in": 28.91200828552246,
"out": 3.5487728118896484,
"total": 32.46078109741211
},
"updated": "2018-03-01T00:01:01"
}
],
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
data | array
of objects
| ||||||||||||||||||||||||||||
page | integer Read-only The current page. | ||||||||||||||||||||||||||||
pages | integer Read-only The total number of pages. | ||||||||||||||||||||||||||||
results | integer Read-only The total number of results. |
errors | array
of objects
|
Create a node balancer
Creates a NodeBalancer in the requested Region. Only available in regions with “NodeBalancers” in their capabilities
.
NodeBalancers require a port Config with at least one backend Node to start serving requests.
When using the Linode CLI to create a NodeBalancer, first create a NodeBalancer without any Configs. Then, create Configs and Nodes for that NodeBalancer with the respective Create a config and Create a node operations.
CLI.
linode-cli nodebalancers create
OAuth.
nodebalancers:read_write
Authorizations
personalAccessToken | |
oauth | nodebalancers:read_write |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"region": "us-east",
"label": "balancer12345",
"client_conn_throttle": 0,
"configs": [
{
"port": 443,
"protocol": "https",
"algorithm": "roundrobin",
"stickiness": "http_cookie",
"check": "http_body",
"check_interval": 90,
"check_timeout": 10,
"check_attempts": 3,
"check_path": "/test",
"check_body": "it works",
"check_passive": true,
"proxy_protocol": "none",
"cipher_suite": "recommended",
"ssl_cert": "-----BEGIN CERTIFICATE-----\nCERTIFICATE_INFORMATION\n-----END CERTIFICATE-----",
"ssl_key": "-----BEGIN PRIVATE KEY-----\nPRIVATE_KEY_INFORMATION\n-----END PRIVATE KEY-----",
"nodes": [
{
"address": "192.168.210.120:80",
"label": "node1",
"weight": 50,
"mode": "accept"
},
{
"address": "192.168.210.122:81",
"label": "node2",
"weight": 50,
"mode": "accept"
}
]
}
]
}' \
https://api.linode.com/v4/nodebalancers
linode-cli nodebalancers create \
--region us-east \
--label balancer12345 \
--client_conn_throttle 0
Request Body Schema
client_conn_throttle | integer
0..20Throttle connections per second. Set to 0 (zero) to disable throttling. | ||||||||||||||||||||||||||||||||||||||||
configs | array
of objects The port Config(s) to create for this NodeBalancer. Each Config must have a unique port and at least one Node.
| ||||||||||||||||||||||||||||||||||||||||
firewall_id | integer The ID of the Firewall to assign to the NodeBalancer.
| ||||||||||||||||||||||||||||||||||||||||
label | string
3..32
charactersThis NodeBalancer’s label. These must be unique on your Account. | ||||||||||||||||||||||||||||||||||||||||
region Required | string The ID of the Region to create this NodeBalancer in. | ||||||||||||||||||||||||||||||||||||||||
tags | array
of strings An array of Tags applied to this object. Tags are for organizational purposes only. |
Response Samples
{
"client_conn_throttle": 0,
"created": "2018-01-01T00:01:01",
"host": "192.0.2.1.ip.linodeusercontent.com",
"id": 12345,
"ipv4": "203.0.113.1",
"ipv6": null,
"label": "balancer12345",
"region": "us-east",
"tags": [
"example tag",
"another example"
],
"transfer": {
"in": 28.91200828552246,
"out": 3.5487728118896484,
"total": 32.46078109741211
},
"updated": "2018-03-01T00:01:01"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
client_conn_throttle | integer
0..20Throttle connections per second. Set to 0 (zero) to disable throttling. | ||||||
created | string<date-time> Read-only When this NodeBalancer was created. | ||||||
host | string Read-only This NodeBalancer’s hostname, beginning with its IP address and ending with .ip.linodeusercontent.com. | ||||||
id | integer Read-only This NodeBalancer’s unique ID. | ||||||
ipv4 | string<ip> Read-only This NodeBalancer’s public IPv4 address. | ||||||
ipv6 Nullable | string<ip> Read-only This NodeBalancer’s public IPv6 address. | ||||||
label | string
3..32
charactersThis NodeBalancer’s label. These must be unique on your Account. | ||||||
region | string Read-only The Region where this NodeBalancer is located. NodeBalancers only support backends in the same Region. | ||||||
tags | array
of strings An array of Tags applied to this object. Tags are for organizational purposes only. | ||||||
transfer | object Read-only Information about the amount of transfer this NodeBalancer has had so far this month.
| ||||||
updated | string<date-time> Read-only When this NodeBalancer was last updated. |
errors | array
of objects
|
Delete a node balancer
Deletes a NodeBalancer.
This is a destructive action and cannot be undone.
Deleting a NodeBalancer will also delete all associated Configs and Nodes, although the backend servers represented by the Nodes will not be changed or removed. Deleting a NodeBalancer will cause you to lose access to the IP Addresses assigned to this NodeBalancer.
OAuth.
nodebalancers:read_write
Authorizations
personalAccessToken | |
oauth | nodebalancers:read_write |
Path Parameters
nodeBalancerId | integer RequiredThe ID of the NodeBalancer to access. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X DELETE \
https://api.linode.com/v4/nodebalancers/12345
linode-cli nodebalancers delete 12345
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Get a node balancer
Returns a single NodeBalancer you can access.
CLI.
linode-cli nodebalancers view
OAuth.
nodebalancers:read_only
Authorizations
personalAccessToken | |
oauth | nodebalancers:read_only |
Path Parameters
nodeBalancerId | integer RequiredThe ID of the NodeBalancer to access. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/nodebalancers/12345
linode-cli nodebalancers view 12345
Response Samples
{
"client_conn_throttle": 0,
"created": "2018-01-01T00:01:01",
"host": "192.0.2.1.ip.linodeusercontent.com",
"id": 12345,
"ipv4": "203.0.113.1",
"ipv6": null,
"label": "balancer12345",
"region": "us-east",
"tags": [
"example tag",
"another example"
],
"transfer": {
"in": 28.91200828552246,
"out": 3.5487728118896484,
"total": 32.46078109741211
},
"updated": "2018-03-01T00:01:01"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
client_conn_throttle | integer
0..20Throttle connections per second. Set to 0 (zero) to disable throttling. | ||||||
created | string<date-time> Read-only When this NodeBalancer was created. | ||||||
host | string Read-only This NodeBalancer’s hostname, beginning with its IP address and ending with .ip.linodeusercontent.com. | ||||||
id | integer Read-only This NodeBalancer’s unique ID. | ||||||
ipv4 | string<ip> Read-only This NodeBalancer’s public IPv4 address. | ||||||
ipv6 Nullable | string<ip> Read-only This NodeBalancer’s public IPv6 address. | ||||||
label | string
3..32
charactersThis NodeBalancer’s label. These must be unique on your Account. | ||||||
region | string Read-only The Region where this NodeBalancer is located. NodeBalancers only support backends in the same Region. | ||||||
tags | array
of strings An array of Tags applied to this object. Tags are for organizational purposes only. | ||||||
transfer | object Read-only Information about the amount of transfer this NodeBalancer has had so far this month.
| ||||||
updated | string<date-time> Read-only When this NodeBalancer was last updated. |
errors | array
of objects
|
Update a node balancer
Updates information about a NodeBalancer you can access.
CLI.
linode-cli nodebalancers update
OAuth.
nodebalancers:read_write
Authorizations
personalAccessToken | |
oauth | nodebalancers:read_write |
Path Parameters
nodeBalancerId | integer RequiredThe ID of the NodeBalancer to access. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X PUT -d '{
"label": "balancer12345",
"client_conn_throttle": 0
}' \
https://api.linode.com/v4/nodebalancers/12345
linode-cli nodebalancers update 12345 \
--label balancer12345 \
--client_conn_throttle 0
Request Body Schema
client_conn_throttle | integer
0..20Throttle connections per second. Set to 0 (zero) to disable throttling. |
label | string
3..32
charactersThis NodeBalancer’s label. These must be unique on your Account. |
tags | array
of strings An array of Tags applied to this object. Tags are for organizational purposes only. |
Response Samples
{
"client_conn_throttle": 0,
"created": "2018-01-01T00:01:01",
"host": "192.0.2.1.ip.linodeusercontent.com",
"id": 12345,
"ipv4": "203.0.113.1",
"ipv6": null,
"label": "balancer12345",
"region": "us-east",
"tags": [
"example tag",
"another example"
],
"transfer": {
"in": 28.91200828552246,
"out": 3.5487728118896484,
"total": 32.46078109741211
},
"updated": "2018-03-01T00:01:01"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
client_conn_throttle | integer
0..20Throttle connections per second. Set to 0 (zero) to disable throttling. | ||||||
created | string<date-time> Read-only When this NodeBalancer was created. | ||||||
host | string Read-only This NodeBalancer’s hostname, beginning with its IP address and ending with .ip.linodeusercontent.com. | ||||||
id | integer Read-only This NodeBalancer’s unique ID. | ||||||
ipv4 | string<ip> Read-only This NodeBalancer’s public IPv4 address. | ||||||
ipv6 Nullable | string<ip> Read-only This NodeBalancer’s public IPv6 address. | ||||||
label | string
3..32
charactersThis NodeBalancer’s label. These must be unique on your Account. | ||||||
region | string Read-only The Region where this NodeBalancer is located. NodeBalancers only support backends in the same Region. | ||||||
tags | array
of strings An array of Tags applied to this object. Tags are for organizational purposes only. | ||||||
transfer | object Read-only Information about the amount of transfer this NodeBalancer has had so far this month.
| ||||||
updated | string<date-time> Read-only When this NodeBalancer was last updated. |
errors | array
of objects
|