curl --request PATCH \
--url https://api.gcore.com/cloud/v1/loadbalancers/{project_id}/{region_id}/pools/{pool_id}/members/{member_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"admin_state_up": true,
"backup": true,
"monitor_address": "<string>",
"monitor_port": 32768,
"weight": 1
}
'import requests
url = "https://api.gcore.com/cloud/v1/loadbalancers/{project_id}/{region_id}/pools/{pool_id}/members/{member_id}"
payload = {
"admin_state_up": True,
"backup": True,
"monitor_address": "<string>",
"monitor_port": 32768,
"weight": 1
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
admin_state_up: true,
backup: true,
monitor_address: '<string>',
monitor_port: 32768,
weight: 1
})
};
fetch('https://api.gcore.com/cloud/v1/loadbalancers/{project_id}/{region_id}/pools/{pool_id}/members/{member_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gcore.com/cloud/v1/loadbalancers/{project_id}/{region_id}/pools/{pool_id}/members/{member_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'admin_state_up' => true,
'backup' => true,
'monitor_address' => '<string>',
'monitor_port' => 32768,
'weight' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gcore.com/cloud/v1/loadbalancers/{project_id}/{region_id}/pools/{pool_id}/members/{member_id}"
payload := strings.NewReader("{\n \"admin_state_up\": true,\n \"backup\": true,\n \"monitor_address\": \"<string>\",\n \"monitor_port\": 32768,\n \"weight\": 1\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.gcore.com/cloud/v1/loadbalancers/{project_id}/{region_id}/pools/{pool_id}/members/{member_id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"admin_state_up\": true,\n \"backup\": true,\n \"monitor_address\": \"<string>\",\n \"monitor_port\": 32768,\n \"weight\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cloud/v1/loadbalancers/{project_id}/{region_id}/pools/{pool_id}/members/{member_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"admin_state_up\": true,\n \"backup\": true,\n \"monitor_address\": \"<string>\",\n \"monitor_port\": 32768,\n \"weight\": 1\n}"
response = http.request(request)
puts response.read_body{
"tasks": [
"d478ae29-dedc-4869-82f0-96104425f565"
]
}Update load balancer pool member
Updates the specified member’s mutable settings. address, protocol_port and
subnet_id cannot be changed after creation. If no changes are detected, no task
is created and an empty task list is returned.
curl --request PATCH \
--url https://api.gcore.com/cloud/v1/loadbalancers/{project_id}/{region_id}/pools/{pool_id}/members/{member_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"admin_state_up": true,
"backup": true,
"monitor_address": "<string>",
"monitor_port": 32768,
"weight": 1
}
'import requests
url = "https://api.gcore.com/cloud/v1/loadbalancers/{project_id}/{region_id}/pools/{pool_id}/members/{member_id}"
payload = {
"admin_state_up": True,
"backup": True,
"monitor_address": "<string>",
"monitor_port": 32768,
"weight": 1
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
admin_state_up: true,
backup: true,
monitor_address: '<string>',
monitor_port: 32768,
weight: 1
})
};
fetch('https://api.gcore.com/cloud/v1/loadbalancers/{project_id}/{region_id}/pools/{pool_id}/members/{member_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gcore.com/cloud/v1/loadbalancers/{project_id}/{region_id}/pools/{pool_id}/members/{member_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'admin_state_up' => true,
'backup' => true,
'monitor_address' => '<string>',
'monitor_port' => 32768,
'weight' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gcore.com/cloud/v1/loadbalancers/{project_id}/{region_id}/pools/{pool_id}/members/{member_id}"
payload := strings.NewReader("{\n \"admin_state_up\": true,\n \"backup\": true,\n \"monitor_address\": \"<string>\",\n \"monitor_port\": 32768,\n \"weight\": 1\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.gcore.com/cloud/v1/loadbalancers/{project_id}/{region_id}/pools/{pool_id}/members/{member_id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"admin_state_up\": true,\n \"backup\": true,\n \"monitor_address\": \"<string>\",\n \"monitor_port\": 32768,\n \"weight\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cloud/v1/loadbalancers/{project_id}/{region_id}/pools/{pool_id}/members/{member_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"admin_state_up\": true,\n \"backup\": true,\n \"monitor_address\": \"<string>\",\n \"monitor_port\": 32768,\n \"weight\": 1\n}"
response = http.request(request)
puts response.read_body{
"tasks": [
"d478ae29-dedc-4869-82f0-96104425f565"
]
}Authorizations
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
1
Region ID
1
Pool ID
"00000000-0000-4000-8000-000000000000"
Member ID
"00000000-0000-4000-8000-000000000000"
Body
Administrative state of the member. Omit to leave unchanged; false disables the member so it receives no traffic.
true
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. Omit to leave unchanged.
true
false
Alternate IP address used for health monitoring of a backend member. Set to null to clear it and fall back to the member address; omit to leave unchanged.
Alternate protocol port used for health monitoring of a backend member. Set to null to clear it and fall back to the member protocol_port; omit to leave unchanged.
1 <= x <= 65535Member weight. Valid values are 0 < weight <= 256. Omit to leave unchanged. 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.
x <= 2561
Response
OK
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.
["d478ae29-dedc-4869-82f0-96104425f565"]
Was this page helpful?