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": [
    "d478ae29-dedc-4869-82f0-96104425f565"
  ]
}

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

Examples:

1

region_id
integer
required

Region ID

Required range: x > 0
Examples:

1

Body

application/json
lb_algorithm
enum<string>
required

Load balancer algorithm

Available options:
LEAST_CONNECTIONS,
ROUND_ROBIN,
SOURCE_IP
name
string
required

Pool name

Examples:

"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
object | null

Health monitor details

Examples:
{
"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

loadbalancer_id
string<uuid4> | null

Loadbalancer ID

Examples:

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

members
CreateLbPoolMemberSerializer · object[] | null

Pool members

Examples:
[
{
"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
}
]
secret_id
string<uuid4> | null

Secret ID for TLS client authentication to the member servers

session_persistence
object | null

Session persistence details

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

Frontend client inactivity timeout in milliseconds

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

50000

timeout_member_connect
integer | null

Backend member connection timeout in milliseconds

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

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

Examples:
["d478ae29-dedc-4869-82f0-96104425f565"]