Create an L4 Load Balancer
Send a POST request to /v1/load_balancers/l4 to create a new Load Balancer. Fill in the required parameters to specify details.
Authorization
bearerAuth In: header
Request Body
| Field | Details |
|---|---|
name | stringGive a name to a balancer. |
location_id | integerSpecify a location where you want to create a balancer. A request for location IDs is in the Location section. |
cluster_id? | stringA unique identifier of a dedicated Load Balancer cluster. A Load Balancer will be created on a specified dedicated cluster. If this parameter is not mentioned, a balancer will be created in a shared cluster. A request to list cluster IDs. |
store_logs? | booleanDefault: If you need the storing logs option, fill this parameter in with the |
store_logs_region_id? | integerA cloud region ID of the cloud storage for logs. You can list all region IDs in the relevant request. |
array<object>A vhost zone is a forwarding rule to be applied to a balancer. | |
array<object>It is a group of upstream servers with predefined parameters. | |
labels? | objectSpecify labels you want to attach to the resource. Refer to the Labels section for more details. |
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/load_balancers/l4" \ -H "Content-Type: application/json" \ -d '{ "name": "name550", "location_id": 537, "cluster_id": null, "store_logs": true, "store_logs_region_id": 0, "vhost_zones": [ { "id": "name551", "ports": [ 58 ], "udp": true, "proxy_protocol": true, "upstream_id": "name552" } ], "upstream_zones": [ { "id": "name552", "udp": true, "upstreams": [ { "ip": "10.0.8.4", "port": 59, "weight": 1 } ] } ], "labels": { "environment": "production", "service": "my-web-app", "example.com/project": "my-project", "example.com/owner": "my-team" } }'{ "id": "nXe0vbxr", "name": "name555", "type": "l4", "status": "in_process", "external_addresses": [], "location_id": 539, "proxy_protocol_enabled": true, "store_logs": true, "vhost_zones": [ { "udp": true, "proxy_protocol": true, "id": "name556", "ports": [ 68 ], "upstream_id": "name557" } ], "upstream_zones": [ { "method": "random.least_conn", "hc_interval": 5, "hc_jitter": 5, "hc_fails": 1, "hc_passes": 3, "udp": true, "id": "name557", "upstreams": [ { "ip": "10.0.8.4", "port": 69, "weight": 1, "max_conns": 63000, "max_fails": 0, "fail_timeout": 30, "status": "unknown" } ] } ], "labels": { "environment": "production", "service": "my-web-app", "example.com/project": "my-project", "example.com/owner": "my-team" }, "cluster_id": "N1aMj3bW", "shared_cluster": false, "created_at": "2026-05-28T06:58:54Z", "updated_at": "2026-05-28T06:58:54Z"}