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

client = Gcore(
    api_key="My API Key",
)
task_id_list = client.cloud.load_balancers.pools.members.add(
    pool_id="00000000-0000-4000-8000-000000000000",
    project_id=1,
    region_id=1,
    address="192.168.40.33",
    protocol_port=80,
)
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

pool_id
string<uuid4>
required

Pool ID

Examples:

"00000000-0000-4000-8000-000000000000"

Body

application/json
address
string<ipvanyaddress>
required

Member IP address

Examples:

"192.168.40.33"

protocol_port
integer
required

Member IP port

Examples:

80

admin_state_up
boolean
default:true

Administrative state of the resource. When set to true, the resource is enabled and operational. When set to false, the resource is disabled and will not process traffic. When null is passed, the value is skipped and defaults to true.

Examples:

true

backup
boolean
default:false

Set to true if the member is a backup member, to which traffic will be sent exclusively when all non-backup members will be unreachable. It allows to realize ACTIVE-BACKUP load balancing without thinking about VRRP and VIP configuration. Default is false.

Examples:

true

false

instance_id
string<uuid4> | null

Either subnet_id or instance_id should be provided

Examples:

"a7e7e8d6-0bf7-4ac9-8170-831b47ee2ba9"

monitor_address
string<ipvanyaddress> | null

An alternate IP address used for health monitoring of a backend member. Default is null which monitors the member address.

monitor_port
integer | null

An alternate protocol port used for health monitoring of a backend member. Default is null which monitors the member protocol_port.

subnet_id
string<uuid4> | null

subnet_id in which address is present. Either subnet_id or instance_id should be provided

Examples:

"32283b0b-b560-4690-810c-f672cbb2e28d"

weight
integer

Member weight. Valid values are 0 < weight <= 256, defaults to 1. Controls traffic distribution based on the pool's load balancing algorithm: * ROUND_ROBIN: Distributes connections to each member in turn according to weights. Higher weight = more turns in the cycle. Example: weights 3 vs 1 = ~75% vs ~25% of requests. * LEAST_CONNECTIONS: Sends new connections to the member with fewest active connections, performing round-robin within groups of the same normalized load. Higher weight = allowed to hold more simultaneous connections before being considered 'more loaded'. Example: weights 2 vs 1 means 20 vs 10 active connections is treated as balanced. * SOURCE_IP: Routes clients consistently to the same member by hashing client source IP; hash result is modulo total weight of running members. Higher weight = more hash buckets, so more client IPs map to that member. Example: weights 2 vs 1 = roughly two-thirds of distinct client IPs map to the higher-weight member.

Required range: 0 < x <= 256
Examples:

1

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.

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