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.update(
pool_id="00000000-0000-4000-8000-000000000000",
project_id=1,
region_id=1,
)
print(task_id_list.tasks)package main
import (
"context"
"fmt"
"github.com/G-Core/gcore-go"
"github.com/G-Core/gcore-go/cloud"
"github.com/G-Core/gcore-go/option"
)
func main() {
client := gcore.NewClient(
option.WithAPIKey("My API Key"),
)
taskIDList, err := client.Cloud.LoadBalancers.Pools.Update(
context.TODO(),
"00000000-0000-4000-8000-000000000000",
cloud.LoadBalancerPoolUpdateParams{
ProjectID: gcore.Int(1),
RegionID: gcore.Int(1),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", taskIDList.Tasks)
}
curl --request PATCH \
--url https://api.gcore.com/cloud/v2/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": "/"
},
"lb_algorithm": "ROUND_ROBIN",
"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",
"protocol": "HTTP",
"secret_id": "<string>",
"session_persistence": {
"type": "APP_COOKIE",
"cookie_name": "cookie_name",
"persistence_granularity": "<string>",
"persistence_timeout": 123
},
"timeout_client_data": 50000,
"timeout_member_connect": 50000,
"timeout_member_data": 0
}
'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: '/'
},
lb_algorithm: 'ROUND_ROBIN',
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',
protocol: 'HTTP',
secret_id: '<string>',
session_persistence: {
type: 'APP_COOKIE',
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/v2/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/v2/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' => '/'
],
'lb_algorithm' => 'ROUND_ROBIN',
'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',
'protocol' => 'HTTP',
'secret_id' => '<string>',
'session_persistence' => [
'type' => 'APP_COOKIE',
'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;
}HttpResponse<String> response = Unirest.patch("https://api.gcore.com/cloud/v2/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 \"lb_algorithm\": \"ROUND_ROBIN\",\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 \"protocol\": \"HTTP\",\n \"secret_id\": \"<string>\",\n \"session_persistence\": {\n \"type\": \"APP_COOKIE\",\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/v2/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 \"lb_algorithm\": \"ROUND_ROBIN\",\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 \"protocol\": \"HTTP\",\n \"secret_id\": \"<string>\",\n \"session_persistence\": {\n \"type\": \"APP_COOKIE\",\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"
]
}{
"detail": "<string>",
"exception_class": "<string>",
"hint": "<string>",
"message": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"trace_id": "<string>",
"type": "internal-server-error",
"context": {
"allowed_methods": [
"<string>"
],
"blocking_count": 123,
"blocking_resources": [
{
"resource_id": "<string>",
"resource_type": "<string>",
"resource_name": "<string>"
}
],
"client_id": 123,
"operation": "<string>",
"project_id": 123,
"quotas": [
{
"available": 123,
"limit": 123,
"name": "<string>",
"overflow": 123,
"region_id": 123,
"requested": 123,
"resulting_usage": 123,
"scope": "global",
"unit": "<string>",
"usage": 123
}
],
"reason": "account",
"region_id": 123,
"resource_id": "<string>",
"resource_status": "<string>",
"resource_type": "<string>",
"retry_after": 123
},
"errors": [
{
"code": "<string>",
"detail": "<string>",
"loc": [
"<string>"
],
"ctx": {}
}
],
"info": null,
"invalid_fields": null
}{
"detail": "<string>",
"exception_class": "<string>",
"hint": "<string>",
"message": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"trace_id": "<string>",
"type": "internal-server-error",
"context": {
"allowed_methods": [
"<string>"
],
"blocking_count": 123,
"blocking_resources": [
{
"resource_id": "<string>",
"resource_type": "<string>",
"resource_name": "<string>"
}
],
"client_id": 123,
"operation": "<string>",
"project_id": 123,
"quotas": [
{
"available": 123,
"limit": 123,
"name": "<string>",
"overflow": 123,
"region_id": 123,
"requested": 123,
"resulting_usage": 123,
"scope": "global",
"unit": "<string>",
"usage": 123
}
],
"reason": "account",
"region_id": 123,
"resource_id": "<string>",
"resource_status": "<string>",
"resource_type": "<string>",
"retry_after": 123
},
"errors": [
{
"code": "<string>",
"detail": "<string>",
"loc": [
"<string>"
],
"ctx": {}
}
],
"info": null,
"invalid_fields": null
}{
"detail": "<string>",
"exception_class": "<string>",
"hint": "<string>",
"message": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"trace_id": "<string>",
"type": "internal-server-error",
"context": {
"allowed_methods": [
"<string>"
],
"blocking_count": 123,
"blocking_resources": [
{
"resource_id": "<string>",
"resource_type": "<string>",
"resource_name": "<string>"
}
],
"client_id": 123,
"operation": "<string>",
"project_id": 123,
"quotas": [
{
"available": 123,
"limit": 123,
"name": "<string>",
"overflow": 123,
"region_id": 123,
"requested": 123,
"resulting_usage": 123,
"scope": "global",
"unit": "<string>",
"usage": 123
}
],
"reason": "account",
"region_id": 123,
"resource_id": "<string>",
"resource_status": "<string>",
"resource_type": "<string>",
"retry_after": 123
},
"errors": [
{
"code": "<string>",
"detail": "<string>",
"loc": [
"<string>"
],
"ctx": {}
}
],
"info": null,
"invalid_fields": null
}{
"detail": "<string>",
"exception_class": "<string>",
"hint": "<string>",
"message": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"trace_id": "<string>",
"type": "internal-server-error",
"context": {
"allowed_methods": [
"<string>"
],
"blocking_count": 123,
"blocking_resources": [
{
"resource_id": "<string>",
"resource_type": "<string>",
"resource_name": "<string>"
}
],
"client_id": 123,
"operation": "<string>",
"project_id": 123,
"quotas": [
{
"available": 123,
"limit": 123,
"name": "<string>",
"overflow": 123,
"region_id": 123,
"requested": 123,
"resulting_usage": 123,
"scope": "global",
"unit": "<string>",
"usage": 123
}
],
"reason": "account",
"region_id": 123,
"resource_id": "<string>",
"resource_status": "<string>",
"resource_type": "<string>",
"retry_after": 123
},
"errors": [
{
"code": "<string>",
"detail": "<string>",
"loc": [
"<string>"
],
"ctx": {}
}
],
"info": null,
"invalid_fields": null
}{
"detail": "<string>",
"exception_class": "<string>",
"hint": "<string>",
"message": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"trace_id": "<string>",
"type": "internal-server-error",
"context": {
"allowed_methods": [
"<string>"
],
"blocking_count": 123,
"blocking_resources": [
{
"resource_id": "<string>",
"resource_type": "<string>",
"resource_name": "<string>"
}
],
"client_id": 123,
"operation": "<string>",
"project_id": 123,
"quotas": [
{
"available": 123,
"limit": 123,
"name": "<string>",
"overflow": 123,
"region_id": 123,
"requested": 123,
"resulting_usage": 123,
"scope": "global",
"unit": "<string>",
"usage": 123
}
],
"reason": "account",
"region_id": 123,
"resource_id": "<string>",
"resource_status": "<string>",
"resource_type": "<string>",
"retry_after": 123
},
"errors": [
{
"code": "<string>",
"detail": "<string>",
"loc": [
"<string>"
],
"ctx": {}
}
],
"info": null,
"invalid_fields": null
}{
"detail": "<string>",
"exception_class": "<string>",
"hint": "<string>",
"message": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"trace_id": "<string>",
"type": "internal-server-error",
"context": {
"allowed_methods": [
"<string>"
],
"blocking_count": 123,
"blocking_resources": [
{
"resource_id": "<string>",
"resource_type": "<string>",
"resource_name": "<string>"
}
],
"client_id": 123,
"operation": "<string>",
"project_id": 123,
"quotas": [
{
"available": 123,
"limit": 123,
"name": "<string>",
"overflow": 123,
"region_id": 123,
"requested": 123,
"resulting_usage": 123,
"scope": "global",
"unit": "<string>",
"usage": 123
}
],
"reason": "account",
"region_id": 123,
"resource_id": "<string>",
"resource_status": "<string>",
"resource_type": "<string>",
"retry_after": 123
},
"errors": [
{
"code": "<string>",
"detail": "<string>",
"loc": [
"<string>"
],
"ctx": {}
}
],
"info": null,
"invalid_fields": null
}{
"detail": "<string>",
"exception_class": "<string>",
"hint": "<string>",
"message": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"trace_id": "<string>",
"type": "internal-server-error",
"context": {
"allowed_methods": [
"<string>"
],
"blocking_count": 123,
"blocking_resources": [
{
"resource_id": "<string>",
"resource_type": "<string>",
"resource_name": "<string>"
}
],
"client_id": 123,
"operation": "<string>",
"project_id": 123,
"quotas": [
{
"available": 123,
"limit": 123,
"name": "<string>",
"overflow": 123,
"region_id": 123,
"requested": 123,
"resulting_usage": 123,
"scope": "global",
"unit": "<string>",
"usage": 123
}
],
"reason": "account",
"region_id": 123,
"resource_id": "<string>",
"resource_status": "<string>",
"resource_type": "<string>",
"retry_after": 123
},
"errors": [
{
"code": "<string>",
"detail": "<string>",
"loc": [
"<string>"
],
"ctx": {}
}
],
"info": null,
"invalid_fields": null
}Update load balancer pool
Updates the specified load balancer pool with the provided changes.
Behavior:
- Simple fields (strings, numbers, booleans) will be updated if provided
- Complex objects (nested structures like members, health monitors, etc.) must be specified completely - partial updates are not supported for these objects
- Undefined fields will remain unchanged
- If no change is detected for a specific field compared to the current pool state, that field will be skipped
- If no changes are detected at all across all fields, no task will be created and an empty task list will be returned
Examples of complex objects that require full specification:
- Pool members: All member properties must be provided when updating members
- Health monitors: Complete health monitor configuration must be specified
- Session persistence: Full session persistence settings must be included
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.update(
pool_id="00000000-0000-4000-8000-000000000000",
project_id=1,
region_id=1,
)
print(task_id_list.tasks)package main
import (
"context"
"fmt"
"github.com/G-Core/gcore-go"
"github.com/G-Core/gcore-go/cloud"
"github.com/G-Core/gcore-go/option"
)
func main() {
client := gcore.NewClient(
option.WithAPIKey("My API Key"),
)
taskIDList, err := client.Cloud.LoadBalancers.Pools.Update(
context.TODO(),
"00000000-0000-4000-8000-000000000000",
cloud.LoadBalancerPoolUpdateParams{
ProjectID: gcore.Int(1),
RegionID: gcore.Int(1),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", taskIDList.Tasks)
}
curl --request PATCH \
--url https://api.gcore.com/cloud/v2/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": "/"
},
"lb_algorithm": "ROUND_ROBIN",
"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",
"protocol": "HTTP",
"secret_id": "<string>",
"session_persistence": {
"type": "APP_COOKIE",
"cookie_name": "cookie_name",
"persistence_granularity": "<string>",
"persistence_timeout": 123
},
"timeout_client_data": 50000,
"timeout_member_connect": 50000,
"timeout_member_data": 0
}
'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: '/'
},
lb_algorithm: 'ROUND_ROBIN',
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',
protocol: 'HTTP',
secret_id: '<string>',
session_persistence: {
type: 'APP_COOKIE',
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/v2/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/v2/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' => '/'
],
'lb_algorithm' => 'ROUND_ROBIN',
'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',
'protocol' => 'HTTP',
'secret_id' => '<string>',
'session_persistence' => [
'type' => 'APP_COOKIE',
'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;
}HttpResponse<String> response = Unirest.patch("https://api.gcore.com/cloud/v2/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 \"lb_algorithm\": \"ROUND_ROBIN\",\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 \"protocol\": \"HTTP\",\n \"secret_id\": \"<string>\",\n \"session_persistence\": {\n \"type\": \"APP_COOKIE\",\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/v2/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 \"lb_algorithm\": \"ROUND_ROBIN\",\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 \"protocol\": \"HTTP\",\n \"secret_id\": \"<string>\",\n \"session_persistence\": {\n \"type\": \"APP_COOKIE\",\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"
]
}{
"detail": "<string>",
"exception_class": "<string>",
"hint": "<string>",
"message": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"trace_id": "<string>",
"type": "internal-server-error",
"context": {
"allowed_methods": [
"<string>"
],
"blocking_count": 123,
"blocking_resources": [
{
"resource_id": "<string>",
"resource_type": "<string>",
"resource_name": "<string>"
}
],
"client_id": 123,
"operation": "<string>",
"project_id": 123,
"quotas": [
{
"available": 123,
"limit": 123,
"name": "<string>",
"overflow": 123,
"region_id": 123,
"requested": 123,
"resulting_usage": 123,
"scope": "global",
"unit": "<string>",
"usage": 123
}
],
"reason": "account",
"region_id": 123,
"resource_id": "<string>",
"resource_status": "<string>",
"resource_type": "<string>",
"retry_after": 123
},
"errors": [
{
"code": "<string>",
"detail": "<string>",
"loc": [
"<string>"
],
"ctx": {}
}
],
"info": null,
"invalid_fields": null
}{
"detail": "<string>",
"exception_class": "<string>",
"hint": "<string>",
"message": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"trace_id": "<string>",
"type": "internal-server-error",
"context": {
"allowed_methods": [
"<string>"
],
"blocking_count": 123,
"blocking_resources": [
{
"resource_id": "<string>",
"resource_type": "<string>",
"resource_name": "<string>"
}
],
"client_id": 123,
"operation": "<string>",
"project_id": 123,
"quotas": [
{
"available": 123,
"limit": 123,
"name": "<string>",
"overflow": 123,
"region_id": 123,
"requested": 123,
"resulting_usage": 123,
"scope": "global",
"unit": "<string>",
"usage": 123
}
],
"reason": "account",
"region_id": 123,
"resource_id": "<string>",
"resource_status": "<string>",
"resource_type": "<string>",
"retry_after": 123
},
"errors": [
{
"code": "<string>",
"detail": "<string>",
"loc": [
"<string>"
],
"ctx": {}
}
],
"info": null,
"invalid_fields": null
}{
"detail": "<string>",
"exception_class": "<string>",
"hint": "<string>",
"message": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"trace_id": "<string>",
"type": "internal-server-error",
"context": {
"allowed_methods": [
"<string>"
],
"blocking_count": 123,
"blocking_resources": [
{
"resource_id": "<string>",
"resource_type": "<string>",
"resource_name": "<string>"
}
],
"client_id": 123,
"operation": "<string>",
"project_id": 123,
"quotas": [
{
"available": 123,
"limit": 123,
"name": "<string>",
"overflow": 123,
"region_id": 123,
"requested": 123,
"resulting_usage": 123,
"scope": "global",
"unit": "<string>",
"usage": 123
}
],
"reason": "account",
"region_id": 123,
"resource_id": "<string>",
"resource_status": "<string>",
"resource_type": "<string>",
"retry_after": 123
},
"errors": [
{
"code": "<string>",
"detail": "<string>",
"loc": [
"<string>"
],
"ctx": {}
}
],
"info": null,
"invalid_fields": null
}{
"detail": "<string>",
"exception_class": "<string>",
"hint": "<string>",
"message": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"trace_id": "<string>",
"type": "internal-server-error",
"context": {
"allowed_methods": [
"<string>"
],
"blocking_count": 123,
"blocking_resources": [
{
"resource_id": "<string>",
"resource_type": "<string>",
"resource_name": "<string>"
}
],
"client_id": 123,
"operation": "<string>",
"project_id": 123,
"quotas": [
{
"available": 123,
"limit": 123,
"name": "<string>",
"overflow": 123,
"region_id": 123,
"requested": 123,
"resulting_usage": 123,
"scope": "global",
"unit": "<string>",
"usage": 123
}
],
"reason": "account",
"region_id": 123,
"resource_id": "<string>",
"resource_status": "<string>",
"resource_type": "<string>",
"retry_after": 123
},
"errors": [
{
"code": "<string>",
"detail": "<string>",
"loc": [
"<string>"
],
"ctx": {}
}
],
"info": null,
"invalid_fields": null
}{
"detail": "<string>",
"exception_class": "<string>",
"hint": "<string>",
"message": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"trace_id": "<string>",
"type": "internal-server-error",
"context": {
"allowed_methods": [
"<string>"
],
"blocking_count": 123,
"blocking_resources": [
{
"resource_id": "<string>",
"resource_type": "<string>",
"resource_name": "<string>"
}
],
"client_id": 123,
"operation": "<string>",
"project_id": 123,
"quotas": [
{
"available": 123,
"limit": 123,
"name": "<string>",
"overflow": 123,
"region_id": 123,
"requested": 123,
"resulting_usage": 123,
"scope": "global",
"unit": "<string>",
"usage": 123
}
],
"reason": "account",
"region_id": 123,
"resource_id": "<string>",
"resource_status": "<string>",
"resource_type": "<string>",
"retry_after": 123
},
"errors": [
{
"code": "<string>",
"detail": "<string>",
"loc": [
"<string>"
],
"ctx": {}
}
],
"info": null,
"invalid_fields": null
}{
"detail": "<string>",
"exception_class": "<string>",
"hint": "<string>",
"message": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"trace_id": "<string>",
"type": "internal-server-error",
"context": {
"allowed_methods": [
"<string>"
],
"blocking_count": 123,
"blocking_resources": [
{
"resource_id": "<string>",
"resource_type": "<string>",
"resource_name": "<string>"
}
],
"client_id": 123,
"operation": "<string>",
"project_id": 123,
"quotas": [
{
"available": 123,
"limit": 123,
"name": "<string>",
"overflow": 123,
"region_id": 123,
"requested": 123,
"resulting_usage": 123,
"scope": "global",
"unit": "<string>",
"usage": 123
}
],
"reason": "account",
"region_id": 123,
"resource_id": "<string>",
"resource_status": "<string>",
"resource_type": "<string>",
"retry_after": 123
},
"errors": [
{
"code": "<string>",
"detail": "<string>",
"loc": [
"<string>"
],
"ctx": {}
}
],
"info": null,
"invalid_fields": null
}{
"detail": "<string>",
"exception_class": "<string>",
"hint": "<string>",
"message": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"trace_id": "<string>",
"type": "internal-server-error",
"context": {
"allowed_methods": [
"<string>"
],
"blocking_count": 123,
"blocking_resources": [
{
"resource_id": "<string>",
"resource_type": "<string>",
"resource_name": "<string>"
}
],
"client_id": 123,
"operation": "<string>",
"project_id": 123,
"quotas": [
{
"available": 123,
"limit": 123,
"name": "<string>",
"overflow": 123,
"region_id": 123,
"requested": 123,
"resulting_usage": 123,
"scope": "global",
"unit": "<string>",
"usage": 123
}
],
"reason": "account",
"region_id": 123,
"resource_id": "<string>",
"resource_status": "<string>",
"resource_type": "<string>",
"retry_after": 123
},
"errors": [
{
"code": "<string>",
"detail": "<string>",
"loc": [
"<string>"
],
"ctx": {}
}
],
"info": null,
"invalid_fields": null
}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. Deprecated. Use PUT /v1/loadbalancers/{project_id}/{region_id}/pools/{pool_id}/members instead.
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
Task IDs
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?