curl --request PATCH \
--url https://api.gcore.com/cloud/v1/lbpools/{project_id}/{region_id}/{pool_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"admin_state_up": true,
"ca_secret_id": "<string>",
"crl_secret_id": "<string>",
"healthmonitor": {
"delay": 10,
"max_retries": 2,
"timeout": 5,
"admin_state_up": true,
"domain_name": "example.com",
"expected_codes": "200,301,302",
"http_method": "CONNECT",
"http_version": "1.1",
"max_retries_down": 2,
"type": "HTTP",
"url_path": "/"
},
"members": [
{
"address": "192.168.40.33",
"id": "a7e7e8d6-0bf7-4ac9-8170-831b47ee2ba9",
"operating_status": "NO_MONITOR",
"protocol_port": 80,
"subnet_id": "32283b0b-b560-4690-810c-f672cbb2e28d",
"weight": 1
}
],
"name": "new_pool_name",
"secret_id": "<string>",
"session_persistence": {
"cookie_name": "cookie_name",
"persistence_granularity": "<string>",
"persistence_timeout": 123
},
"timeout_client_data": 50000,
"timeout_member_connect": 50000,
"timeout_member_data": 0
}
'import requests
url = "https://api.gcore.com/cloud/v1/lbpools/{project_id}/{region_id}/{pool_id}"
payload = {
"admin_state_up": True,
"ca_secret_id": "<string>",
"crl_secret_id": "<string>",
"healthmonitor": {
"delay": 10,
"max_retries": 2,
"timeout": 5,
"admin_state_up": True,
"domain_name": "example.com",
"expected_codes": "200,301,302",
"http_method": "CONNECT",
"http_version": "1.1",
"max_retries_down": 2,
"type": "HTTP",
"url_path": "/"
},
"members": [
{
"address": "192.168.40.33",
"id": "a7e7e8d6-0bf7-4ac9-8170-831b47ee2ba9",
"operating_status": "NO_MONITOR",
"protocol_port": 80,
"subnet_id": "32283b0b-b560-4690-810c-f672cbb2e28d",
"weight": 1
}
],
"name": "new_pool_name",
"secret_id": "<string>",
"session_persistence": {
"cookie_name": "cookie_name",
"persistence_granularity": "<string>",
"persistence_timeout": 123
},
"timeout_client_data": 50000,
"timeout_member_connect": 50000,
"timeout_member_data": 0
}
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,
ca_secret_id: '<string>',
crl_secret_id: '<string>',
healthmonitor: {
delay: 10,
max_retries: 2,
timeout: 5,
admin_state_up: true,
domain_name: 'example.com',
expected_codes: '200,301,302',
http_method: 'CONNECT',
http_version: '1.1',
max_retries_down: 2,
type: 'HTTP',
url_path: '/'
},
members: [
{
address: '192.168.40.33',
id: 'a7e7e8d6-0bf7-4ac9-8170-831b47ee2ba9',
operating_status: 'NO_MONITOR',
protocol_port: 80,
subnet_id: '32283b0b-b560-4690-810c-f672cbb2e28d',
weight: 1
}
],
name: 'new_pool_name',
secret_id: '<string>',
session_persistence: {
cookie_name: 'cookie_name',
persistence_granularity: '<string>',
persistence_timeout: 123
},
timeout_client_data: 50000,
timeout_member_connect: 50000,
timeout_member_data: 0
})
};
fetch('https://api.gcore.com/cloud/v1/lbpools/{project_id}/{region_id}/{pool_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/lbpools/{project_id}/{region_id}/{pool_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,
'ca_secret_id' => '<string>',
'crl_secret_id' => '<string>',
'healthmonitor' => [
'delay' => 10,
'max_retries' => 2,
'timeout' => 5,
'admin_state_up' => true,
'domain_name' => 'example.com',
'expected_codes' => '200,301,302',
'http_method' => 'CONNECT',
'http_version' => '1.1',
'max_retries_down' => 2,
'type' => 'HTTP',
'url_path' => '/'
],
'members' => [
[
'address' => '192.168.40.33',
'id' => 'a7e7e8d6-0bf7-4ac9-8170-831b47ee2ba9',
'operating_status' => 'NO_MONITOR',
'protocol_port' => 80,
'subnet_id' => '32283b0b-b560-4690-810c-f672cbb2e28d',
'weight' => 1
]
],
'name' => 'new_pool_name',
'secret_id' => '<string>',
'session_persistence' => [
'cookie_name' => 'cookie_name',
'persistence_granularity' => '<string>',
'persistence_timeout' => 123
],
'timeout_client_data' => 50000,
'timeout_member_connect' => 50000,
'timeout_member_data' => 0
]),
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/lbpools/{project_id}/{region_id}/{pool_id}"
payload := strings.NewReader("{\n \"admin_state_up\": true,\n \"ca_secret_id\": \"<string>\",\n \"crl_secret_id\": \"<string>\",\n \"healthmonitor\": {\n \"delay\": 10,\n \"max_retries\": 2,\n \"timeout\": 5,\n \"admin_state_up\": true,\n \"domain_name\": \"example.com\",\n \"expected_codes\": \"200,301,302\",\n \"http_method\": \"CONNECT\",\n \"http_version\": \"1.1\",\n \"max_retries_down\": 2,\n \"type\": \"HTTP\",\n \"url_path\": \"/\"\n },\n \"members\": [\n {\n \"address\": \"192.168.40.33\",\n \"id\": \"a7e7e8d6-0bf7-4ac9-8170-831b47ee2ba9\",\n \"operating_status\": \"NO_MONITOR\",\n \"protocol_port\": 80,\n \"subnet_id\": \"32283b0b-b560-4690-810c-f672cbb2e28d\",\n \"weight\": 1\n }\n ],\n \"name\": \"new_pool_name\",\n \"secret_id\": \"<string>\",\n \"session_persistence\": {\n \"cookie_name\": \"cookie_name\",\n \"persistence_granularity\": \"<string>\",\n \"persistence_timeout\": 123\n },\n \"timeout_client_data\": 50000,\n \"timeout_member_connect\": 50000,\n \"timeout_member_data\": 0\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/lbpools/{project_id}/{region_id}/{pool_id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"admin_state_up\": true,\n \"ca_secret_id\": \"<string>\",\n \"crl_secret_id\": \"<string>\",\n \"healthmonitor\": {\n \"delay\": 10,\n \"max_retries\": 2,\n \"timeout\": 5,\n \"admin_state_up\": true,\n \"domain_name\": \"example.com\",\n \"expected_codes\": \"200,301,302\",\n \"http_method\": \"CONNECT\",\n \"http_version\": \"1.1\",\n \"max_retries_down\": 2,\n \"type\": \"HTTP\",\n \"url_path\": \"/\"\n },\n \"members\": [\n {\n \"address\": \"192.168.40.33\",\n \"id\": \"a7e7e8d6-0bf7-4ac9-8170-831b47ee2ba9\",\n \"operating_status\": \"NO_MONITOR\",\n \"protocol_port\": 80,\n \"subnet_id\": \"32283b0b-b560-4690-810c-f672cbb2e28d\",\n \"weight\": 1\n }\n ],\n \"name\": \"new_pool_name\",\n \"secret_id\": \"<string>\",\n \"session_persistence\": {\n \"cookie_name\": \"cookie_name\",\n \"persistence_granularity\": \"<string>\",\n \"persistence_timeout\": 123\n },\n \"timeout_client_data\": 50000,\n \"timeout_member_connect\": 50000,\n \"timeout_member_data\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cloud/v1/lbpools/{project_id}/{region_id}/{pool_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 \"ca_secret_id\": \"<string>\",\n \"crl_secret_id\": \"<string>\",\n \"healthmonitor\": {\n \"delay\": 10,\n \"max_retries\": 2,\n \"timeout\": 5,\n \"admin_state_up\": true,\n \"domain_name\": \"example.com\",\n \"expected_codes\": \"200,301,302\",\n \"http_method\": \"CONNECT\",\n \"http_version\": \"1.1\",\n \"max_retries_down\": 2,\n \"type\": \"HTTP\",\n \"url_path\": \"/\"\n },\n \"members\": [\n {\n \"address\": \"192.168.40.33\",\n \"id\": \"a7e7e8d6-0bf7-4ac9-8170-831b47ee2ba9\",\n \"operating_status\": \"NO_MONITOR\",\n \"protocol_port\": 80,\n \"subnet_id\": \"32283b0b-b560-4690-810c-f672cbb2e28d\",\n \"weight\": 1\n }\n ],\n \"name\": \"new_pool_name\",\n \"secret_id\": \"<string>\",\n \"session_persistence\": {\n \"cookie_name\": \"cookie_name\",\n \"persistence_granularity\": \"<string>\",\n \"persistence_timeout\": 123\n },\n \"timeout_client_data\": 50000,\n \"timeout_member_connect\": 50000,\n \"timeout_member_data\": 0\n}"
response = http.request(request)
puts response.read_body{
"tasks": [
"d478ae29-dedc-4869-82f0-96104425f565"
]
}Update load balancer pool
Changes provided here will overwrite existing load balancer pool settings. Undefined fields will be kept as is. Complex objects need to be specified fully, they will be overwritten.
Deprecated: Use PATCH /v2/lbpools/{project_id}/{region_id}/{pool_id} instead.
curl --request PATCH \
--url https://api.gcore.com/cloud/v1/lbpools/{project_id}/{region_id}/{pool_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"admin_state_up": true,
"ca_secret_id": "<string>",
"crl_secret_id": "<string>",
"healthmonitor": {
"delay": 10,
"max_retries": 2,
"timeout": 5,
"admin_state_up": true,
"domain_name": "example.com",
"expected_codes": "200,301,302",
"http_method": "CONNECT",
"http_version": "1.1",
"max_retries_down": 2,
"type": "HTTP",
"url_path": "/"
},
"members": [
{
"address": "192.168.40.33",
"id": "a7e7e8d6-0bf7-4ac9-8170-831b47ee2ba9",
"operating_status": "NO_MONITOR",
"protocol_port": 80,
"subnet_id": "32283b0b-b560-4690-810c-f672cbb2e28d",
"weight": 1
}
],
"name": "new_pool_name",
"secret_id": "<string>",
"session_persistence": {
"cookie_name": "cookie_name",
"persistence_granularity": "<string>",
"persistence_timeout": 123
},
"timeout_client_data": 50000,
"timeout_member_connect": 50000,
"timeout_member_data": 0
}
'import requests
url = "https://api.gcore.com/cloud/v1/lbpools/{project_id}/{region_id}/{pool_id}"
payload = {
"admin_state_up": True,
"ca_secret_id": "<string>",
"crl_secret_id": "<string>",
"healthmonitor": {
"delay": 10,
"max_retries": 2,
"timeout": 5,
"admin_state_up": True,
"domain_name": "example.com",
"expected_codes": "200,301,302",
"http_method": "CONNECT",
"http_version": "1.1",
"max_retries_down": 2,
"type": "HTTP",
"url_path": "/"
},
"members": [
{
"address": "192.168.40.33",
"id": "a7e7e8d6-0bf7-4ac9-8170-831b47ee2ba9",
"operating_status": "NO_MONITOR",
"protocol_port": 80,
"subnet_id": "32283b0b-b560-4690-810c-f672cbb2e28d",
"weight": 1
}
],
"name": "new_pool_name",
"secret_id": "<string>",
"session_persistence": {
"cookie_name": "cookie_name",
"persistence_granularity": "<string>",
"persistence_timeout": 123
},
"timeout_client_data": 50000,
"timeout_member_connect": 50000,
"timeout_member_data": 0
}
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,
ca_secret_id: '<string>',
crl_secret_id: '<string>',
healthmonitor: {
delay: 10,
max_retries: 2,
timeout: 5,
admin_state_up: true,
domain_name: 'example.com',
expected_codes: '200,301,302',
http_method: 'CONNECT',
http_version: '1.1',
max_retries_down: 2,
type: 'HTTP',
url_path: '/'
},
members: [
{
address: '192.168.40.33',
id: 'a7e7e8d6-0bf7-4ac9-8170-831b47ee2ba9',
operating_status: 'NO_MONITOR',
protocol_port: 80,
subnet_id: '32283b0b-b560-4690-810c-f672cbb2e28d',
weight: 1
}
],
name: 'new_pool_name',
secret_id: '<string>',
session_persistence: {
cookie_name: 'cookie_name',
persistence_granularity: '<string>',
persistence_timeout: 123
},
timeout_client_data: 50000,
timeout_member_connect: 50000,
timeout_member_data: 0
})
};
fetch('https://api.gcore.com/cloud/v1/lbpools/{project_id}/{region_id}/{pool_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/lbpools/{project_id}/{region_id}/{pool_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,
'ca_secret_id' => '<string>',
'crl_secret_id' => '<string>',
'healthmonitor' => [
'delay' => 10,
'max_retries' => 2,
'timeout' => 5,
'admin_state_up' => true,
'domain_name' => 'example.com',
'expected_codes' => '200,301,302',
'http_method' => 'CONNECT',
'http_version' => '1.1',
'max_retries_down' => 2,
'type' => 'HTTP',
'url_path' => '/'
],
'members' => [
[
'address' => '192.168.40.33',
'id' => 'a7e7e8d6-0bf7-4ac9-8170-831b47ee2ba9',
'operating_status' => 'NO_MONITOR',
'protocol_port' => 80,
'subnet_id' => '32283b0b-b560-4690-810c-f672cbb2e28d',
'weight' => 1
]
],
'name' => 'new_pool_name',
'secret_id' => '<string>',
'session_persistence' => [
'cookie_name' => 'cookie_name',
'persistence_granularity' => '<string>',
'persistence_timeout' => 123
],
'timeout_client_data' => 50000,
'timeout_member_connect' => 50000,
'timeout_member_data' => 0
]),
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/lbpools/{project_id}/{region_id}/{pool_id}"
payload := strings.NewReader("{\n \"admin_state_up\": true,\n \"ca_secret_id\": \"<string>\",\n \"crl_secret_id\": \"<string>\",\n \"healthmonitor\": {\n \"delay\": 10,\n \"max_retries\": 2,\n \"timeout\": 5,\n \"admin_state_up\": true,\n \"domain_name\": \"example.com\",\n \"expected_codes\": \"200,301,302\",\n \"http_method\": \"CONNECT\",\n \"http_version\": \"1.1\",\n \"max_retries_down\": 2,\n \"type\": \"HTTP\",\n \"url_path\": \"/\"\n },\n \"members\": [\n {\n \"address\": \"192.168.40.33\",\n \"id\": \"a7e7e8d6-0bf7-4ac9-8170-831b47ee2ba9\",\n \"operating_status\": \"NO_MONITOR\",\n \"protocol_port\": 80,\n \"subnet_id\": \"32283b0b-b560-4690-810c-f672cbb2e28d\",\n \"weight\": 1\n }\n ],\n \"name\": \"new_pool_name\",\n \"secret_id\": \"<string>\",\n \"session_persistence\": {\n \"cookie_name\": \"cookie_name\",\n \"persistence_granularity\": \"<string>\",\n \"persistence_timeout\": 123\n },\n \"timeout_client_data\": 50000,\n \"timeout_member_connect\": 50000,\n \"timeout_member_data\": 0\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/lbpools/{project_id}/{region_id}/{pool_id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"admin_state_up\": true,\n \"ca_secret_id\": \"<string>\",\n \"crl_secret_id\": \"<string>\",\n \"healthmonitor\": {\n \"delay\": 10,\n \"max_retries\": 2,\n \"timeout\": 5,\n \"admin_state_up\": true,\n \"domain_name\": \"example.com\",\n \"expected_codes\": \"200,301,302\",\n \"http_method\": \"CONNECT\",\n \"http_version\": \"1.1\",\n \"max_retries_down\": 2,\n \"type\": \"HTTP\",\n \"url_path\": \"/\"\n },\n \"members\": [\n {\n \"address\": \"192.168.40.33\",\n \"id\": \"a7e7e8d6-0bf7-4ac9-8170-831b47ee2ba9\",\n \"operating_status\": \"NO_MONITOR\",\n \"protocol_port\": 80,\n \"subnet_id\": \"32283b0b-b560-4690-810c-f672cbb2e28d\",\n \"weight\": 1\n }\n ],\n \"name\": \"new_pool_name\",\n \"secret_id\": \"<string>\",\n \"session_persistence\": {\n \"cookie_name\": \"cookie_name\",\n \"persistence_granularity\": \"<string>\",\n \"persistence_timeout\": 123\n },\n \"timeout_client_data\": 50000,\n \"timeout_member_connect\": 50000,\n \"timeout_member_data\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cloud/v1/lbpools/{project_id}/{region_id}/{pool_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 \"ca_secret_id\": \"<string>\",\n \"crl_secret_id\": \"<string>\",\n \"healthmonitor\": {\n \"delay\": 10,\n \"max_retries\": 2,\n \"timeout\": 5,\n \"admin_state_up\": true,\n \"domain_name\": \"example.com\",\n \"expected_codes\": \"200,301,302\",\n \"http_method\": \"CONNECT\",\n \"http_version\": \"1.1\",\n \"max_retries_down\": 2,\n \"type\": \"HTTP\",\n \"url_path\": \"/\"\n },\n \"members\": [\n {\n \"address\": \"192.168.40.33\",\n \"id\": \"a7e7e8d6-0bf7-4ac9-8170-831b47ee2ba9\",\n \"operating_status\": \"NO_MONITOR\",\n \"protocol_port\": 80,\n \"subnet_id\": \"32283b0b-b560-4690-810c-f672cbb2e28d\",\n \"weight\": 1\n }\n ],\n \"name\": \"new_pool_name\",\n \"secret_id\": \"<string>\",\n \"session_persistence\": {\n \"cookie_name\": \"cookie_name\",\n \"persistence_granularity\": \"<string>\",\n \"persistence_timeout\": 123\n },\n \"timeout_client_data\": 50000,\n \"timeout_member_connect\": 50000,\n \"timeout_member_data\": 0\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"
Body
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. Defaults to true.
true
false
Secret ID of CA certificate bundle
Secret ID of CA revocation list file
New pool health monitor settings
Show child attributes
Show child attributes
New load balancer pool algorithm of how to distribute requests
LEAST_CONNECTIONS, ROUND_ROBIN, SOURCE_IP "ROUND_ROBIN"
New sequence of load balancer pool members. If members are the same (by address + port), they will be kept as is without recreation and downtime.
Show child attributes
Show child attributes
[ { "address": "192.168.40.33", "id": "a7e7e8d6-0bf7-4ac9-8170-831b47ee2ba9", "operating_status": "NO_MONITOR", "protocol_port": 80, "subnet_id": "32283b0b-b560-4690-810c-f672cbb2e28d", "weight": 1 } ]
New pool name
^[a-zA-Z0-9][a-zA-Z 0-9._\-]{1,61}[a-zA-Z0-9._]$"new_pool_name"
New communication protocol
HTTP, HTTPS, PROXY, PROXYV2, TCP, UDP "HTTP"
Secret ID for TLS client authentication to the member servers
New session persistence settings
Show child attributes
Show child attributes
Frontend client inactivity timeout in milliseconds. We are recommending to use listener.timeout_client_data instead.
0 <= x <= 8640000050000
Backend member connection timeout in milliseconds
0 <= x <= 8640000050000
Backend member inactivity timeout in milliseconds
0 <= x <= 864000000
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?