v32

latestOpenAPI 3.1.0raw.githubusercontent.com2026-05-151,1412,2144.5 MB
Load Balancers

Create load balancer

post/cloud/v1/loadbalancers/{project_id}/{region_id}

Path parameters

project_idinteger required

Project ID

Example:1

Project ID

region_idinteger required

Region ID

Example:7

Region ID

Request body

flavorstring

Load balancer flavor name

namestring required

Load balancer name.

preferred_connectivity'L2' | 'L3'
tagsCreateTagsSerializer

A tag is a key-value pair that can be associated with a resource, enabling efficient filtering and grouping for better organization and management. Some tags are read-only and cannot be modified by the user. Tags are also integrated with cost reports, allowing cost data to be filtered based on tag keys or values.

vip_ip_family'dual' | 'ipv4' | 'ipv6'
vip_network_idstring uuid4

Network ID for load balancer. If not specified, default external network will be used. Mutually exclusive with vip_port_id

vip_port_idstring uuid4

Existing Reserved Fixed IP port ID for load balancer. Mutually exclusive with vip_network_id

vip_subnet_idstring uuid4

Subnet ID for load balancer. If not specified, any subnet from vip_network_id will be selected. Ignored when vip_network_id is not specified.

Example request

{
  "flavor": "lb1-1-2",
  "floating_ip": {
    "source": "new"
  },
  "listeners": [
    {
      "allowed_cidrs": [
        "10.0.0.0/8"
      ],
      "connection_limit": 100000,
      "name": "my_listener",
      "pools": [
        {
          "healthmonitor": {
            "admin_state_up": true,
            "delay": 10,
            "domain_name": "example.com",
            "expected_codes": "200,301,302",
            "http_version": "1.1",
            "max_retries": 2,
            "max_retries_down": 2,
            "timeout": 5,
            "url_path": "/"
          },
          "members": [
            {
              "address": "192.168.1.101",
              "instance_id": "a7e7e8d6-0bf7-4ac9-8170-831b47ee2ba9",
              "protocol_port": 8000,
              "weight": 2
            },
            {
              "address": "192.168.1.102",
              "instance_id": "169942e0-9b53-42df-95ef-1a8b6525c2bd",
              "protocol_port": 8000,
              "weight": 4
            }
          ],
          "name": "pool_name",
          "session_persistence": {
            "cookie_name": "cookie_name"
          },
          "timeout_client_data": 50000,
          "timeout_member_connect": 50000
        }
      ],
      "protocol_port": 80,
      "sni_secret_id": [
        "f2e734d0-fa2b-42c2-ad33-4c6db5101e00",
        "eb121225-7ded-4ff3-ae1f-599e145dd7cb"
      ],
      "timeout_client_data": 50000,
      "timeout_member_connect": 50000,
      "user_list": [
        {
          "encrypted_password": "$5$isRr.HJ1IrQP38.m$oViu3DJOpUG2ZsjCBtbITV3mqpxxbZfyWJojLPNSPO5",
          "username": "admin"
        }
      ]
    }
  ],
  "logging": {
    "destination_region_id": 1,
    "enabled": true,
    "retention_policy": {
      "period": 45
    },
    "topic_name": "my-log-name"
  },
  "name": "new_load_balancer",
  "vip_network_id": "ac307687-31a4-4a11-a949-6bea1b2878f5",
  "vip_port_id": "ff83e13a-b256-4be2-ba5d-028d3f0ab450",
  "vip_subnet_id": "4e7802d3-5023-44b8-b298-7726558fddf4"
}

Response

OK

tasksstring[] required

List of task IDs representing asynchronous operations. Use these IDs to monitor operation progress:

  • GET /v1/tasks/{task_id} - Check individual task status and details Poll task status until completion (FINISHED/ERROR) before proceeding with dependent operations.
idstring required

Example response

{
  "tasks": [
    "d478ae29-dedc-4869-82f0-96104425f565"
  ]
}