Skip to main content
POST
/
cloud
/
v1
/
lbpools
/
{project_id}
/
{region_id}
Python
import os
from gcore import Gcore

client = Gcore(
    api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
)
task_id_list = client.cloud.load_balancers.pools.create(
    project_id=1,
    region_id=1,
    lb_algorithm="LEAST_CONNECTIONS",
    name="pool_name",
    protocol="HTTP",
)
print(task_id_list.tasks)
{
  "tasks": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

project_id
integer
required

Project ID

region_id
integer
required

Region ID

Body

application/json
lb_algorithm
enum<string>
required

Load balancer algorithm

Available options:
LEAST_CONNECTIONS,
ROUND_ROBIN,
SOURCE_IP
name
string
required

Pool name

protocol
enum<string>
required

Protocol

Available options:
HTTP,
HTTPS,
PROXY,
PROXYV2,
TCP,
UDP
ca_secret_id
string<uuid4> | null

Secret ID of CA certificate bundle

crl_secret_id
string<uuid4> | null

Secret ID of CA revocation list file

healthmonitor
CreateLbHealthMonitorSerializer · object

Health monitor details

Example:
{
"delay": 10,
"http_method": "GET",
"max_retries": 3,
"max_retries_down": 3,
"timeout": 5,
"type": "HTTP",
"url_path": "/"
}
listener_id
string<uuid4> | null

Listener ID

load_balancer_id
string<uuid4> | null

Loadbalancer ID

Example:

"bbb35f84-35cc-4b2f-84c2-a6a29bba68aa"

members
CreateLbPoolMemberSerializer · object[]

Pool members

secret_id
string<uuid4> | null

Secret ID for TLS client authentication to the member servers

session_persistence
MutateLbSessionPersistence · object

Session persistence details

Example:
{
"cookie_name": "cookie_name",
"type": "APP_COOKIE"
}
timeout_client_data
integer | null

Frontend client inactivity timeout in milliseconds

Required range: 0 <= x <= 86400000
Example:

50000

timeout_member_connect
integer | null

Backend member connection timeout in milliseconds

Required range: 0 <= x <= 86400000
Example:

50000

timeout_member_data
integer | null

Backend member inactivity timeout in milliseconds

Required range: 0 <= x <= 86400000

Response

200 - application/json

OK

tasks
string[]
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.