Skip to main content

node_balancers

Creates, updates, deletes, gets or lists a node_balancers resource.

Overview

Namenode_balancers
TypeResource
Idlinode.nodebalancers.node_balancers

Fields

The following fields are returned by SELECT queries:

The requested NodeBalancer object.

NameDatatypeDescription
idintegerRead-only This NodeBalancer's unique ID.
client_conn_throttleintegerThrottle TCP connections per second for TCP, HTTP, and HTTPS configurations. Set to 0 (zero) to disable throttling.
createdstring (date-time)Read-only When this NodeBalancer was created. (example: 2018-01-01T00:01:01)
hostnamestringRead-only This NodeBalancer's hostname, beginning with its IP address and ending with .ip.linodeusercontent.com. (example: 192.0.2.1.ip.linodeusercontent.com)
ipv4string (ip)Filterable, Read-only This NodeBalancer's public IPv4 address. (example: 203.0.113.1)
ipv6string (ip)Read-only This NodeBalancer's public IPv6 address.
labelstringFilterable This NodeBalancer's label. These must be unique on your Account. (example: balancer12345, pattern: [a-zA-Z0-9-_]{3,32})
lke_clusterobjectRead-only This NodeBalancer's related LKE cluster, if any. The value is null if this NodeBalancer isn't related to an LKE cluster.
regionstringFilterable, Read-only The Region where this NodeBalancer is located. NodeBalancers only support backends in the same Region. (example: us-east)
tagsarrayFilterable An array of Tags applied to this object. Tags are for organizational purposes only.
transferobjectRead-only Information about the amount of transfer this NodeBalancer has had so far this month.
typestringRead-only The type of NodeBalancer. (example: premium)
updatedstring (date-time)Read-only When this NodeBalancer was last updated. (example: 2018-03-01T00:01:01)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_node_balancerselectReturns a single NodeBalancer you can access.

Learn more...

Learn more...
get_node_balancersselectpage, page_sizeReturns a paginated list of NodeBalancers you have access to.

Learn more...

Learn more...
post_node_balancerinsertdata__regionCreates 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.

Learn more...

Learn more...
put_node_balancerreplaceUpdates information about a NodeBalancer you can access.

> 🚧
>
> You can configure UDP on the same NodeBalancer that also uses TCP, HTTP, or HTTPS, but only when managing it through the API. If UDP is configured and you make changes to the TCP, HTTP or HTTPS settings in Cloud Manager, the existing UDP configuration will be overwritten. This is because Cloud Manager doesn't currently support UDP.

Learn more...

Learn more...
delete_node_balancerdeleteDeletes 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.

Learn more...

Learn more...

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
pageintegerThe page of a collection to return.
page_sizeintegerThe number of items to return per page.

SELECT examples

Returns a single NodeBalancer you can access.

Learn more...

Learn more...

SELECT
id,
client_conn_throttle,
created,
hostname,
ipv4,
ipv6,
label,
lke_cluster,
region,
tags,
transfer,
type,
updated
FROM linode.nodebalancers.node_balancers;

INSERT examples

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.

Learn more...

Learn more...

INSERT INTO linode.nodebalancers.node_balancers (
data__client_conn_throttle,
data__configs,
data__firewall_id,
data__label,
data__region,
data__tags,
data__vpcs
)
SELECT
{{ client_conn_throttle }},
'{{ configs }}',
{{ firewall_id }},
'{{ label }}',
'{{ region }}' --required,
'{{ tags }}',
'{{ vpcs }}'
RETURNING
id,
client_conn_throttle,
created,
hostname,
ipv4,
ipv6,
label,
lke_cluster,
region,
tags,
transfer,
type,
updated
;

REPLACE examples

Updates information about a NodeBalancer you can access.

> 🚧
>
> You can configure UDP on the same NodeBalancer that also uses TCP, HTTP, or HTTPS, but only when managing it through the API. If UDP is configured and you make changes to the TCP, HTTP or HTTPS settings in Cloud Manager, the existing UDP configuration will be overwritten. This is because Cloud Manager doesn't currently support UDP.

Learn more...

Learn more...

REPLACE linode.nodebalancers.node_balancers
SET
data__client_conn_throttle = {{ client_conn_throttle }},
data__label = '{{ label }}',
data__tags = '{{ tags }}'
WHERE

RETURNING
id,
client_conn_throttle,
created,
hostname,
ipv4,
ipv6,
label,
lke_cluster,
region,
tags,
transfer,
type,
updated;

DELETE examples

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.

Learn more...

Learn more...

DELETE FROM linode.nodebalancers.node_balancers;