Create an L7 Load Balancer
Send a POST request to /v1/load_balancers/l7 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. |
network_type? | stringValue in: Specify whether the balancer should use a public or private network. Accepts |
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. |
geoip? | booleanDefault: To enable the GeoIP feature, write |
array<object>A vhost zone is a forwarding rule to be applied to a balancer. | |
array<object>An upstream zone 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/l7" \ -H "Content-Type: application/json" \ -d '{ "name": "name1717", "location_id": 1722, "network_type": "public", "store_logs": true, "store_logs_region_id": 0, "geoip": "true", "vhost_zones": [ { "id": "name1718", "ports": [ 585 ], "ssl": true, "http2": false, "ssl_certificate_id": "5xe7kye7", "domains": [ "example-2152.com" ], "location_zones": [ { "location": "/path141", "upstream_path": "/path142", "upstream_id": "name1719" } ], "real_ip_header": { "name": "forwarded_for", "networks": [ "127.0.0.1/16", "192.168.0.1/32" ] } } ], "upstream_zones": [ { "id": "name1719", "upstreams": [ { "ip": "10.0.8.4", "port": 586, "weight": 1 } ] } ], "labels": { "environment": "production", "service": "my-web-app", "example.com/project": "my-project", "example.com/owner": "my-team" } }'{ "id": "l9avgrbG", "name": "name1727", "type": "l7", "status": "in_process", "network_type": "public", "external_addresses": [], "internal_addresses": [], "location_id": 1726, "redirect_http": false, "geoip": true, "geoip_enabled": true, "store_logs": true, "domains": [ "127.0.5.1" ], "vhost_zones": [ { "ssl": true, "http2": false, "http2_push_preload": false, "http_to_https_redirect": false, "proxy_request_headers": [], "id": "name1728", "ports": [ 597 ], "domains": [ "127.0.5.1" ], "location_zones": [ { "upstream_path": "/path146", "location": "/path145", "upstream_id": "name1729" } ], "real_ip_header": { "name": "forwarded_for", "networks": [ "127.0.0.1/16", "192.168.0.1/32" ] }, "ssl_certificate_id": "WPe9mBeL" } ], "upstream_zones": [ { "method": "random.least_conn", "hc_interval": 5, "hc_jitter": 5, "hc_fails": 1, "hc_passes": 3, "grpc": false, "sticky": true, "ssl": false, "hc_path": "/", "hc_method": "GET", "id": "name1729", "hc_domain": "127.0.5.1", "upstreams": [ { "ip": "10.0.8.4", "port": 598, "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": null, "shared_cluster": true, "created_at": "2025-12-31T00:00:00Z", "updated_at": "2025-12-31T00:00:00Z"}