Skip to content

Update Load Balancer

PUT
/api/v1/appliances/load-balancers/{lb_id}/
curl --request PUT \
--url 'https://api.e2enetworks.com/myaccount/api/v1/appliances/load-balancers/{lb_id}/?project_id=<PROJECT_ID>&apikey=<API_KEY>&location=<LOCATION>' \
--header 'Authorization: Bearer <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"lb_name": "new-name-1",
"lb_type": "external",
"lb_mode": "HTTP",
"lb_port": "80",
"plan_name": "E2E-LB-2",
"node_list_type": "D",
"backends": [
{
"name": "backend-group-1",
"balance": "source",
"backend_mode": "http",
"backend_ssl": false,
"http_check": true,
"check_url": "/",
"domain_name": "localhost",
"websocket_timeout": 60,
"network_id": null,
"scaler_id": null,
"scaler_port": null,
"servers": [
{
"backend_name": "C3-8GB-853",
"backend_ip": "10.2.3.4",
"backend_port": 543
}
]
}
],
"tcp_backend": [],
"acl_list": [
{
"acl_name": "acl-1",
"acl_condition": "path_beg -i",
"acl_matching_path": "/api"
}
],
"acl_map": [
{
"acl_name": "acl-1",
"acl_backend": "backend-group-1",
"acl_condition_state": true
}
],
"default_backend": "backend-group-1",
"ssl_context": {
"ssl_certificate_id": null,
"redirect_to_https": false
},
"connection_timeout": 61,
"client_timeout": 61,
"server_timeout": 61,
"http_keep_alive_timeout": 61,
"vpc_list": [
{
"network_id": "12345",
"vpc_name": "VPC-261",
"ipv4_cidr": "10.1.2.3/23"
}
],
"security_group_id": 12345,
"enable_bitninja": false,
"is_ipv6_attached": false,
"lb_reserve_ip": ""
}'

Updates the configuration of an existing load balancer. This is the endpoint used to add or change backends, backend servers, ACL routing rules (acl_list / acl_map), the TCP backend (tcp_backend), timeouts, SSL settings, and the plan.

The full configuration context must be re-sent on every update - the console reads the current context object (from List Load Balancers), mutates the arrays it needs to change, and PUTs the entire object back. Any field omitted is treated as cleared. Key rules enforced by the backend:

  • backends and tcp_backend are mutually exclusive; tcp_backend may contain at most one entry.

  • acl_list / acl_map may only be used on an ALB (they cannot coexist with tcp_backend).

  • default_backend may only be set when backends is non-empty.

  • For an internal load balancer (lb_type: internal) vpc_list is required and lb_reserve_ip must be empty.

lb_id
required
integer

The id of the load balancer, as returned by the List Load Balancers endpoint.

Example

12345
project_id
required
integer

Identifier of the project to scope the request to. Required integer project ID.

Example

<PROJECT_ID>
apikey
required
string

API key used to authenticate the update request

Example

<API_KEY>
location
required
string

Region of the load balancer being updated.

Example

<LOCATION>
Media typeapplication/json

The complete load balancer configuration context. Read the current context from List Load Balancers, change the fields you need, and PUT the whole object back. Fields shared with create (plan, timeouts, ssl_context, vpc_list, backends/servers, security and encryption flags) behave identically; the fields below are the ones most relevant to updates.

object
lb_name
required

Display name (changing it here renames the load balancer).

string

Example

new-name-1
lb_type
required

Network scheme. internal requires a non-empty vpc_list and forbids lb_reserve_ip.

string
Allowed values: external internal

Example

external
lb_mode
required

Frontend protocol (HTTP/HTTPS/BOTH for an ALB, TCP for an NLB).

string

Example

HTTP
lb_port
required

Listening port (string).

string

Example

80
plan_name
required

Plan SKU. Changing it here is not how you upgrade - use Perform Load Balancer Action with type: upgrade_plan instead.

string

Example

E2E-LB-2
node_list_type
required
string
Allowed values: D

Example

D
backends

ALB backend groups (same item shape as create). Add, edit, or remove backends here. Empty for an NLB. Deleting a backend also prunes any acl_map entries that targeted it.

Array<object>
object
name
string

Example

backend-group-1
balance
string
Allowed values: source roundrobin leastconn

Example

source
backend_mode
string

Example

http
backend_ssl
boolean

Example

false
http_check
boolean

Example

true
check_url
string

Example

/
domain_name
string

Example

localhost
websocket_timeout

WebSocket idle timeout (1-100s); send null (not empty string) to disable.

integer
nullable

Example

60
network_id
string
nullable

Example

null
scaler_id
string
nullable

Example

null
scaler_port
string
nullable

Example

null
servers
Array<object>
object
backend_name
string

Example

C3-8GB-853
backend_ip
string

Example

10.2.3.4
backend_port
integer

Example

543
tcp_backend

NLB TCP backend (same item shape as create). At most one entry. Mutually exclusive with backends.

Array
acl_list

Layer-7 ACL rule definitions (the match conditions). Only valid on an ALB - cannot coexist with tcp_backend. Each entry is paired 1:1 with an acl_map entry by acl_name.

Array<object>
object
acl_name
required

Unique name for this ACL rule; referenced by the matching acl_map entry.

string

Example

acl-1
acl_condition
required

HAProxy match condition. Built in the console from an ACL type (Path / Host / Query Parameter / HTTP Request / Source IP) and a comparison.

string
Allowed values: hdr(host) -i hdr_beg(host) -i hdr_end(host) -i hdr_reg(host) -i path path_beg path_end path_reg path -i path_beg -i path_end -i path_reg -i src method urlp urlp_beg urlp_end urlp_reg

Example

path_beg -i
acl_matching_path
required

The value to match - a path, host, IP/CIDR, query-parameter value, or (for an HTTP-request ACL) a space-separated list of methods such as GET POST.

string

Example

/api
acl_map

Maps named ACL rules (from acl_list) to the backend that should serve matching traffic. Only valid on an ALB.

Array<object>
object
acl_name
required

Name of the ACL rule (must match an acl_list[].acl_name).

string

Example

acl-1
acl_backend
required

Name of the backend group that serves traffic matching this ACL.

string

Example

backend-group-1
acl_condition_state

When true (default) the rule routes to acl_backend on a match; false negates the condition.

boolean

Example

true
default_backend

Backend that serves unmatched traffic. Must be empty if there are no backends.

string

Example

backend-group-1
ssl_context

TLS configuration (ALB only).

object
ssl_certificate_id
integer
nullable

Example

null
redirect_to_https
boolean

Example

false
connection_timeout
integer

Example

61
client_timeout
integer

Example

61
server_timeout
integer

Example

61
http_keep_alive_timeout
integer

Example

61
vpc_list

VPC attachments (required for internal load balancers).

Array<object>
object
network_id
string

Example

12345
vpc_name
string

Example

VPC-261
ipv4_cidr
string

Example

10.1.2.3/23
security_group_id
integer

Example

12345
enable_bitninja
boolean

Example

false
is_ipv6_attached
boolean

Example

false
lb_reserve_ip
string

Example

Successful response

Media typeapplication/json
object
code
integer
data
object
appliance_id
integer
is_credit_sufficient
boolean
errors
object
message
string

Example

{
"code": 200,
"data": {
"appliance_id": 7972,
"is_credit_sufficient": true
},
"message": "Success"
}