nodes
Creates, updates, deletes, gets or lists a nodes resource.
Overviewβ
| Name | nodes |
| Type | Resource |
| Id | linode.nodebalancers.nodes |
Fieldsβ
The following fields are returned by SELECT queries:
- get
- list
A paginated list of NodeBalancer nodes.
| Name | Datatype | Description |
|---|---|---|
id | integer | Read-only This node's unique ID. |
config_id | integer | Read-only The NodeBalancer Config ID that this Node belongs to. |
nodebalancer_id | integer | Read-only The NodeBalancer ID that this Node belongs to. |
vpc_config_id | integer | Read-only For VPC backends, you can use the vpc_config_id to get VPC IDs and VPC subnet IDs. Returns a null value if the backend is not a VPC node. Included only in {apiVersion} v4beta. |
address | string (ip) | The address and port where this backend can be reached: either the Linodeβs private IPv4, public IPv6, or the VPC's IPv4 address. (example: 10.0.0.45:80) |
label | string | The label for this node. This is for display purposes only. (example: vpc-node, pattern: [a-zA-Z0-9-_.]{3,32}) |
mode | string | The mode this NodeBalancer should use when sending traffic to this backend. - If set to accept this backend is accepting traffic. - If set to reject this backend will not receive traffic. - If set to drain this backend will not receive new traffic, but connections already pinned to it will continue to be routed to it. - If set to backup, this backend will only receive traffic if all accept nodes are down. (accept, reject, drain, backup) (example: accept) |
status | string | Read-only The current status of this node, based on the configured checks of its NodeBalancer Config. (Unknown, UP, DOWN) (example: UP) |
weight | integer | Used when picking a backend to serve a request and is not pinned to a single backend yet. Nodes with a higher weight will receive more traffic. |
A paginated list of NodeBalancer nodes.
| Name | Datatype | Description |
|---|
Methodsβ
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | nodeBalancerId, configId, nodeId | Returns information about a single Node, a backend for this NodeBalancer's configured port. Learn more... Learn more... | |
list | select | nodeBalancerId, configId | page, page_size | Returns a paginated list of NodeBalancer nodes associated with this Config. These are the backends that will be sent traffic for this port. Learn more... Learn more... |
create | insert | nodeBalancerId, configId | Creates a backend node that can receive traffic for the NodeBalancer configuration. Requests are routed to backend nodes on the specified port based on their status. The configurable fields for the backend node depend on the chosen protocol and whether the node is located within a Linode VPC.> π§ > > 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. CLI: TCP, HTTP, HTTPS. <br /> linode-cli nodebalancers node-create \<br /> 12345 4567 \<br /> --address 10.0.0.45:80 \<br /> --label node54321 \<br /> --weight 50 \<br /> --mode accept \<br /> --subnet_id 1<br /> Learn more... - CLI: UDP. <br /> linode-cli nodebalancers node-create \<br /> 12345 4567 \<br /> --address 192.168.210.120:80 \<br /> --label node54321 \<br /> --weight 50<br /> Learn more... Learn more... | |
update | replace | nodeBalancerId, configId, nodeId | Updates information about a node, a backend for this NodeBalancer's configured port. > π§ > > 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. CLI: TCP, HTTP, HTTPS. <br /> linode-cli nodebalancers node-update \<br /> 12345 4567 54321 \<br /> --address 192.168.210.120:80 \<br /> --label node54321 \<br /> --weight 50 \<br /> --mode accept<br /> Learn more... - CLI: UDP. <br /> linode-cli nodebalancers node-create \<br /> 12345 4567 \<br /> --address 192.168.210.120:80 \<br /> --label node54321 \<br /> --weight 50<br /> Learn more... Learn more... | |
delete | delete | nodeBalancerId, configId, nodeId | Deletes a Node from this Config. This backend will no longer receive traffic for the configured port of this NodeBalancer. This does not change or remove the Linode whose address was used in the creation of this Node. 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 |
|---|---|---|
configId | string | The ID of the Config to access. |
nodeBalancerId | string | The ID of the NodeBalancer. (example: {{nodeBalancerId}}) |
nodeId | string | The ID of the Node to access. (example: {{nodeId}}) |
page | integer | The page of a collection to return. |
page_size | integer | The number of items to return per page. |
SELECT examplesβ
- get
- list
Returns information about a single Node, a backend for this NodeBalancer's configured port.
Learn more...
Learn more...
SELECT
id,
config_id,
nodebalancer_id,
vpc_config_id,
address,
label,
mode,
status,
weight
FROM linode.nodebalancers.nodes
WHERE nodeBalancerId = '{{ nodeBalancerId }}' -- required
AND configId = '{{ configId }}' -- required
AND nodeId = '{{ nodeId }}' -- required
;
Returns a paginated list of NodeBalancer nodes associated with this Config. These are the backends that will be sent traffic for this port.
Learn more...
Learn more...
SELECT
*
FROM linode.nodebalancers.nodes
WHERE nodeBalancerId = '{{ nodeBalancerId }}' -- required
AND configId = '{{ configId }}' -- required
AND page = '{{ page }}'
AND page_size = '{{ page_size }}'
;
INSERT examplesβ
- create
- Manifest
Creates a backend node that can receive traffic for the NodeBalancer configuration. Requests are routed to backend nodes on the specified port based on their status. The configurable fields for the backend node depend on the chosen protocol and whether the node is located within a Linode VPC.
> π§
>
> 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. CLI: TCP, HTTP, HTTPS.
<br /> linode-cli nodebalancers node-create \<br /> 12345 4567 \<br /> --address 10.0.0.45:80 \<br /> --label node54321 \<br /> --weight 50 \<br /> --mode accept \<br /> --subnet_id 1<br />
Learn more...
- CLI: UDP.
<br /> linode-cli nodebalancers node-create \<br /> 12345 4567 \<br /> --address 192.168.210.120:80 \<br /> --label node54321 \<br /> --weight 50<br />
Learn more...
Learn more...
INSERT INTO linode.nodebalancers.nodes (
address,
label,
subnet_id,
weight,
nodeBalancerId,
configId
)
SELECT
'{{ address }}',
'{{ label }}',
{{ subnet_id }},
{{ weight }},
'{{ nodeBalancerId }}',
'{{ configId }}'
RETURNING
id,
config_id,
nodebalancer_id,
vpc_config_id,
address,
label,
mode,
status,
weight
;
# Description fields are for documentation purposes
- name: nodes
props:
- name: nodeBalancerId
value: "{{ nodeBalancerId }}"
description: Required parameter for the nodes resource.
- name: configId
value: "{{ configId }}"
description: Required parameter for the nodes resource.
- name: address
value: "{{ address }}"
description: |
Backend nodes can be Linodes and Linodes within a VPC. The following IP types are supported:
- For non-VPC backend nodes, the private IPv4 address and port where this backend can be reached.
- For non-VPC backend nodes, the public IPv6 address and port where this backend can be reached.
- For backend nodes within a VPC, the IPv4 address and port where this backend can be reached.
- name: label
value: "{{ label }}"
description: |
The label for this node. This is for display purposes only.
- name: subnet_id
value: {{ subnet_id }}
description: |
Required for VPC backend nodes only. The VPC's subnet. To display information about your VPCs and their subnets, run the [List VPCs](https://techdocs.akamai.com/linode-api/reference/get-vpcs) operation.
- name: weight
value: {{ weight }}
description: |
Used when picking a backend to serve a request and is not pinned to a single backend yet. Nodes with a higher weight will receive more traffic.
REPLACE examplesβ
- update
Updates information about a node, a backend for this NodeBalancer's configured port.
> π§
>
> 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. CLI: TCP, HTTP, HTTPS.
<br /> linode-cli nodebalancers node-update \<br /> 12345 4567 54321 \<br /> --address 192.168.210.120:80 \<br /> --label node54321 \<br /> --weight 50 \<br /> --mode accept<br />
Learn more...
- CLI: UDP.
<br /> linode-cli nodebalancers node-create \<br /> 12345 4567 \<br /> --address 192.168.210.120:80 \<br /> --label node54321 \<br /> --weight 50<br />
Learn more...
Learn more...
REPLACE linode.nodebalancers.nodes
SET
address = '{{ address }}',
label = '{{ label }}',
subnet_id = {{ subnet_id }},
weight = {{ weight }}
WHERE
nodeBalancerId = '{{ nodeBalancerId }}' --required
AND configId = '{{ configId }}' --required
AND nodeId = '{{ nodeId }}' --required
RETURNING
id,
config_id,
nodebalancer_id,
vpc_config_id,
address,
label,
mode,
status,
weight;
DELETE examplesβ
- delete
Deletes a Node from this Config. This backend will no longer receive traffic for the configured port of this NodeBalancer.
This does not change or remove the Linode whose address was used in the creation of this Node.
Learn more...
Learn more...
DELETE FROM linode.nodebalancers.nodes
WHERE nodeBalancerId = '{{ nodeBalancerId }}' --required
AND configId = '{{ configId }}' --required
AND nodeId = '{{ nodeId }}' --required
;