node_balancers
Creates, updates, deletes, gets or lists a node_balancers
resource.
Overview
Name | node_balancers |
Type | Resource |
Id | linode.nodebalancers.node_balancers |
Fields
The following fields are returned by SELECT
queries:
- get_node_balancer
- get_node_balancers
The requested NodeBalancer object.
Name | Datatype | Description |
---|---|---|
id | integer | Read-only This NodeBalancer's unique ID. |
client_conn_throttle | integer | Throttle TCP connections per second for TCP, HTTP, and HTTPS configurations. Set to 0 (zero) to disable throttling. |
created | string (date-time) | Read-only When this NodeBalancer was created. (example: 2018-01-01T00:01:01) |
hostname | string | Read-only This NodeBalancer's hostname, beginning with its IP address and ending with .ip.linodeusercontent.com. (example: 192.0.2.1.ip.linodeusercontent.com) |
ipv4 | string (ip) | Filterable, Read-only This NodeBalancer's public IPv4 address. (example: 203.0.113.1) |
ipv6 | string (ip) | Read-only This NodeBalancer's public IPv6 address. |
label | string | Filterable This NodeBalancer's label. These must be unique on your Account. (example: balancer12345, pattern: [a-zA-Z0-9-_]{3,32} ) |
lke_cluster | object | Read-only This NodeBalancer's related LKE cluster, if any. The value is null if this NodeBalancer isn't related to an LKE cluster. |
region | string | Filterable, Read-only The Region where this NodeBalancer is located. NodeBalancers only support backends in the same Region. (example: us-east) |
tags | array | Filterable 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. |
type | string | Read-only The type of NodeBalancer. (example: premium) |
updated | string (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:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get_node_balancer | select | Returns a single NodeBalancer you can access. Learn more... Learn more... | ||
get_node_balancers | select | page , page_size | Returns a paginated list of NodeBalancers you have access to. Learn more... Learn more... | |
post_node_balancer | insert | data__region | 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... | |
put_node_balancer | replace | 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... | ||
delete_node_balancer | delete | 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... |
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.
Name | Datatype | Description |
---|---|---|
page | integer | The page of a collection to return. |
page_size | integer | The number of items to return per page. |
SELECT
examples
- get_node_balancer
- get_node_balancers
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;
Returns a paginated list of NodeBalancers you have access to.
Learn more...
Learn more...
SELECT
data,
page,
pages,
results
FROM linode.nodebalancers.node_balancers
WHERE page = '{{ page }}'
AND page_size = '{{ page_size }}';
INSERT
examples
- post_node_balancer
- Manifest
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
;
# Description fields are for documentation purposes
- name: node_balancers
props:
- name: client_conn_throttle
value: integer
description: >
Throttle TCP connections per second for TCP, HTTP, and HTTPS configurations. Set to `0` (zero) to disable throttling.
- name: configs
value: array
description: >
The port configs to create for this NodeBalancer. Each config needs a unique port and at least one node.
- name: firewall_id
value: integer
description: >
The ID of the Firewall to assign to the NodeBalancer.
- A NodeBalancer can have only one Firewall assigned to it.
- Firewalls control inbound network traffic to NodeBalancers.
- name: label
value: string
description: >
__Filterable__ This NodeBalancer's label. These must be unique on your Account.
- name: region
value: string
description: >
The ID of the Region to create this NodeBalancer in.
- name: tags
value: array
description: >
An array of Tags applied to this object. Tags are for organizational purposes only.
- name: vpcs
value: array
description: >
You can have only one `vpcs` in a NodeBalancer configuration. If any of your backend nodes are VPC Linodes, specify the VPC subnet and CIDR range. NodeBalancer routes traffic to backend VPC nodes through this subnet. The specified VPC subnet must exist within the same data center as the NodeBalancer, and the provided IP range must be contained within the subnet's CIDR block. All IP addresses within the specified range must be free and available for assignment. Once the NodeBalancer is created, its VPC cannot be changed.
REPLACE
examples
- put_node_balancer
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
- delete_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.
Learn more...
Learn more...
DELETE FROM linode.nodebalancers.node_balancers;