v1

latestSwagger 2.02026-08-04232286653.5 KB
Internal Load Balancers

Creates a load balancer in the project and returns the async operation.

post/projects/{project_id}/networking/internal-load-balancers

Path parameters

project_idstring required

Request body

algorithmstring required

Load balancing algorithm used to distribute traffic across destinations (for example, random).

locationstring required

Location to create the load balancer in.

namestring required

Name for the new load balancer.

protocolsstring[] required

Network protocols the load balancer handles. Currently only one of: tcp, udp.

typestring

Type of the load balancer (for example, internal_ipv4).

Example request

{
  "algorithm": "random",
  "destinations": [
    {
      "cidr": "10.1.2.3/24",
      "resource_id": "306aa10d-5570-4e47-88c9-46bf11bd8737"
    }
  ],
  "health_check": {
    "failure_count": "3",
    "interval": "60",
    "port": "8080",
    "success_count": "2",
    "timeout": "20"
  },
  "location": "us-northcentraleast1-a",
  "name": "my-load-balancer",
  "network_interfaces": [
    {
      "network": "dbaafd53-96ea-4754-9cce-78e7f08ac151",
      "subnet": "09ae8411-0fbb-411c-898c-2b8f19622ae1"
    }
  ],
  "type": "internal_ipv4"
}

Response

Example response

{
  "operation": {
    "completed_at": "2021-12-03T19:59:34Z",
    "metadata": "{}",
    "operation_id": "F6EF489C-086E-458D-B812-7962964A28C9",
    "result": "{}",
    "started_at": "2021-12-03T19:58:34Z",
    "state": "IN_PROGRESS"
  }
}