Skip to main content
POST
/
project
/
{project_id}
/
location
/
{location}
/
load-balancer
/
{load_balancer_reference}
Create a new Load Balancer in a specific location of a project
curl --request POST \
  --url https://api.ubicloud.com/project/{project_id}/location/{location}/load-balancer/{load_balancer_reference} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "algorithm": "<string>",
  "stack": "<string>",
  "dst_port": 123,
  "health_check_endpoint": "<string>",
  "health_check_protocol": "<string>",
  "private_subnet_id": "<string>",
  "src_port": 123,
  "cert_enabled": true
}'
{
  "algorithm": "<string>",
  "stack": "<string>",
  "dst_port": 123,
  "health_check_endpoint": "<string>",
  "health_check_protocol": "<string>",
  "hostname": "<string>",
  "id": "1bhw8r4pn73t1m5f7rn7a5pej2",
  "location": "<string>",
  "name": "<string>",
  "src_port": 123,
  "cert_enabled": true,
  "subnet": "<string>",
  "vms": [
    {
      "id": "vmhfy8gff8c67hasb0eez2k1pd",
      "ip4": "127.0.0.1",
      "ip4_enabled": true,
      "ip6": "2606:4700:3108::ac42:2835",
      "location": "eu-central-h1",
      "name": "my-vm-name",
      "size": "<string>",
      "state": "<string>",
      "storage_size_gib": 123,
      "unix_user": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Path Parameters

project_id
string
required
Example:
location
string
required
Example:
load_balancer_reference
string
required

Body

application/json
algorithm
string
required
dst_port
integer
required
health_check_protocol
string
required
private_subnet_id
string
required
src_port
integer
required
stack
string
health_check_endpoint
string
cert_enabled
boolean

Response

algorithm
string
required
dst_port
integer
required
health_check_endpoint
string
required
health_check_protocol
string
required
hostname
string
required
id
string
required
Example:
location
string
required
name
string
required
src_port
integer
required
subnet
string
required
vms
object[]
required
stack
string
cert_enabled
boolean