PATCH
/
cloud
/
v1
/
loadbalancers
/
{project_id}
/
{region_id}
/
{loadbalancer_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
)
load_balancer = client.cloud.load_balancers.update(
    loadbalancer_id="loadbalancer_id",
    project_id=0,
    region_id=0,
)
print(load_balancer.id)
{
  "additional_vips": [
    {
      "ip_address": "127.0.0.1",
      "subnet_id": "00000000-0000-4000-8000-000000000000"
    }
  ],
  "created_at": "2019-06-18T11:56:16+0000",
  "creator_task_id": "9f3ec11e-bcd4-4fe6-924a-a4439a56ad22",
  "ddos_profile": {
    "fields": [
      {
        "base_field": 10,
        "default": null,
        "description": "ARK server ports. Valid port values are in range 1000-65535",
        "field_type": null,
        "field_value": [
          45046,
          45047
        ],
        "id": 11,
        "name": "ARK Ports",
        "required": true,
        "validation_schema": {
          "items": {
            "maximum": 65535,
            "minimum": 1000,
            "type": "integer"
          },
          "minItems": 1,
          "type": "array"
        },
        "value": null
      }
    ],
    "id": 0,
    "options": {
      "active": true,
      "bgp": true
    },
    "profile_template": {
      "description": "test client profile template",
      "fields": [
        {
          "default": null,
          "description": "ARK server ports. Valid port values are in range 1000-65535",
          "field_type": null,
          "id": 11,
          "name": "ARK Ports",
          "required": true,
          "validation_schema": {
            "items": {
              "maximum": 65535,
              "minimum": 1000,
              "type": "integer"
            },
            "minItems": 1,
            "type": "array"
          }
        }
      ],
      "id": 0,
      "name": "test_client_profile_template"
    },
    "profile_template_description": "ARK server ports. Valid port values are in range 1000-65535",
    "protocols": [
      {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      }
    ],
    "site": "ED",
    "status": {
      "error_description": "",
      "status": "Updated"
    }
  },
  "flavor": {
    "flavor_id": "1d276f53-2834-4855-9859-aa922f073055",
    "flavor_name": "lb1-1-2",
    "ram": 2048,
    "vcpus": 1
  },
  "floating_ips": [
    {
      "created_at": "2019-06-13T13:58:12+0000",
      "creator_task_id": "d1e1500b-e2be-40aa-9a4b-cc493fa1af30",
      "dns_domain": "string",
      "dns_name": "string",
      "fixed_ip_address": "192.168.10.15",
      "floating_ip_address": "172.24.4.34",
      "id": "c64e5db1-5f1f-43ec-a8d9-5090df85b82d",
      "port_id": "ee2402d0-f0cd-4503-9b75-69be1d11c5f1",
      "project_id": 1337,
      "region": "Luxembourg 1",
      "region_id": 7,
      "router_id": "11005a33-c5ac-4c96-ab6f-8f2827cc7da6",
      "status": "ACTIVE",
      "subnet_id": null,
      "tags": [
        {
          "key": "my-tag",
          "read_only": false,
          "value": "my-tag-value"
        }
      ],
      "task_id": "a4eb4b29-048e-42f6-a5e1-2c18bc001c45",
      "updated_at": "2019-06-13T13:58:12+0000"
    }
  ],
  "id": "e8ab1be4-1521-4266-be69-28dad4148a30",
  "listeners": [
    {
      "id": "43658ea9-54bd-4807-90b1-925921c9a0d1"
    }
  ],
  "logging": {
    "destination_region_id": 1,
    "enabled": true,
    "retention_policy": {
      "period": 45
    },
    "topic_name": "my-log-name"
  },
  "name": "lbaas_test_lb",
  "operating_status": "DEGRADED",
  "preferred_connectivity": "L2",
  "project_id": 1337,
  "provisioning_status": "ACTIVE",
  "region": "Luxembourg 1",
  "region_id": 7,
  "stats": {
    "active_connections": 0,
    "bytes_in": 34942398609,
    "bytes_out": 304777113641,
    "request_errors": 4,
    "total_connections": 21095970
  },
  "tags_v2": [
    {
      "key": "my-tag",
      "read_only": false,
      "value": "my-tag-value"
    }
  ],
  "task_id": "<string>",
  "updated_at": "2019-06-18T11:57:00+0000",
  "vip_address": "5.5.5.5",
  "vip_ip_family": "ipv4",
  "vip_port_id": "4177d1ef-f1c2-4e45-a531-3e05dfa6d848",
  "vrrp_ips": [
    {
      "ip_address": "127.0.0.1",
      "role": "MASTER",
      "subnet_id": "00000000-0000-4000-8000-000000000000"
    }
  ]
}

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

region_id
integer
required

Region ID

loadbalancer_id
string
required

Loadbalancer ID

Body

application/json
logging
object

Logging configuration

name
string

Name.

Examples:

"some_name"

preferred_connectivity
enum<string>

Preferred option to establish connectivity between load balancer and its pools members

Available options:
L2,
L3
tags
object | null

Update key-value tags using JSON Merge Patch semantics (RFC 7386). Provide key-value pairs to add or update tags. Set tag values to null to remove tags. Unspecified tags remain unchanged. Read-only tags are always preserved and cannot be modified. Examples: * Add/update tags: {'tags': {'environment': 'production', 'team': 'backend'}} adds new tags or updates existing ones. * Delete tags: {'tags': {'old_tag': null}} removes specific tags. * Remove all tags: {'tags': null} removes all user-managed tags (read-only tags are preserved). * Partial update: {'tags': {'environment': 'staging'}} only updates specified tags. * Mixed operations: {'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}} adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag', preserving other existing tags. * Replace all: first delete existing tags with null values, then add new ones in the same request.

Examples:
{
"my-tag": "my-tag-value",
"my-tag-to-remove": null
}

Response

Returned load balancer

created_at
string<date-time>
required

Datetime when the load balancer was created

Examples:

"2019-06-18T11:56:16+0000"

id
string<uuid4>
required

Load balancer ID

Examples:

"e8ab1be4-1521-4266-be69-28dad4148a30"

name
string
required

Load balancer name

Examples:

"lbaas_test_lb"

operating_status
enum<string>
required

Load balancer operating status

Available options:
DEGRADED,
DRAINING,
ERROR,
NO_MONITOR,
OFFLINE,
ONLINE
project_id
integer
required

Project ID

Examples:

1337

provisioning_status
enum<string>
required

Load balancer lifecycle status

Available options:
ACTIVE,
DELETED,
ERROR,
PENDING_CREATE,
PENDING_DELETE,
PENDING_UPDATE
region
string
required

Region name

Examples:

"Luxembourg 1"

region_id
integer
required

Region ID

Examples:

7

tags_v2
TagSerializer · object[]
required

List of key-value tags associated with the resource. A tag is a key-value pair that can be associated with a resource, enabling efficient filtering and grouping for better organization and management. Some tags are read-only and cannot be modified by the user. Tags are also integrated with cost reports, allowing cost data to be filtered based on tag keys or values.

Examples:
[
{
"key": "my-tag",
"read_only": false,
"value": "my-tag-value"
}
]
additional_vips
NetworkPortFixedIp · object[]

List of additional IP addresses

creator_task_id
string<uuid4> | null

Task that created this entity

Examples:

"9f3ec11e-bcd4-4fe6-924a-a4439a56ad22"

ddos_profile
object | null

Loadbalancer advanced DDoS protection profile.

Examples:
{
"fields": [
{
"base_field": 10,
"default": null,
"description": "ARK server ports. Valid port values are in range 1000-65535",
"field_type": null,
"field_value": [45046, 45047],
"id": 11,
"name": "ARK Ports",
"required": true,
"validation_schema": {
"items": {
"maximum": 65535,
"minimum": 1000,
"type": "integer"
},
"minItems": 1,
"type": "array"
},
"value": null
}
],
"id": 0,
"options": { "active": true, "bgp": true },
"profile_template": {
"description": "test client profile template",
"fields": [
{
"default": null,
"description": "ARK server ports. Valid port values are in range 1000-65535",
"field_type": null,
"id": 11,
"name": "ARK Ports",
"required": true,
"validation_schema": {
"items": {
"maximum": 65535,
"minimum": 1000,
"type": "integer"
},
"minItems": 1,
"type": "array"
}
}
],
"id": 0,
"name": "test_client_profile_template"
},
"profile_template_description": "ARK server ports. Valid port values are in range 1000-65535",
"protocols": [
{
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}
],
"site": "ED",
"status": {
"error_description": "",
"status": "Updated"
}
}
flavor
object | null

Load balancer flavor (if not default)

Examples:
{
"flavor_id": "1d276f53-2834-4855-9859-aa922f073055",
"flavor_name": "lb1-1-2",
"ram": 2048,
"vcpus": 1
}
floating_ips
FloatingIPSerializer · object[]

List of assigned floating IPs

listeners
ListenerSerializer · object[]

Load balancer listeners

logging
object | null

Logging configuration

Examples:
{
"destination_region_id": 1,
"enabled": true,
"retention_policy": { "period": 45 },
"topic_name": "my-log-name"
}
preferred_connectivity
enum<string>

Preferred option to establish connectivity between load balancer and its pools members

Available options:
L2,
L3
stats
object | null

Statistics of load balancer.

Examples:
{
"active_connections": 0,
"bytes_in": 34942398609,
"bytes_out": 304777113641,
"request_errors": 4,
"total_connections": 21095970
}
task_id
string<uuid4> | null

The UUID of the active task that currently holds a lock on the resource. This lock prevents concurrent modifications to ensure consistency. If null, the resource is not locked.

updated_at
string<date-time> | null

Datetime when the load balancer was last updated

Examples:

"2019-06-18T11:57:00+0000"

vip_address
string<ipvanyaddress> | null

Load balancer IP address

Examples:

"5.5.5.5"

vip_ip_family
enum<string> | null

Load balancer IP family

Available options:
dual,
ipv4,
ipv6
Examples:

"ipv4"

vip_port_id
string<uuid4> | null

The ID of the Virtual IP (VIP) port.

Examples:

"4177d1ef-f1c2-4e45-a531-3e05dfa6d848"

vrrp_ips
VRRPIP · object[]

List of VRRP IP addresses