> ## Documentation Index
> Fetch the complete documentation index at: https://gcore.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Update load balancer

> Rename load balancer, activate/deactivate logging, update preferred connectivity type,
modify load balancer tags, and/or set `admin_state_up` to enable/disable the load balancer.
The request will only process the fields that are provided in the request body.
Any fields that are not included will remain unchanged.



## OpenAPI

````yaml /api-reference/services_documented/cloud_api.yaml patch /cloud/v2/loadbalancers/{project_id}/{region_id}/{load_balancer_id}
openapi: 3.1.0
info:
  title: Gcore OpenAPI – Cloud API
  description: >-
    This OpenAPI is an aggregated OpenAPI specification that unifies all Gcore
    products into a single file. It covers Cloud, CDN, DNS, WAAP, DDoS
    Protection, Object Storage, Streaming, and FastEdge services.
  version: '2026-05-07T20:33:46.548242+00:00'
servers:
  - url: https://api.gcore.com
security:
  - APIKey: []
tags:
  - name: Bare Metal
    x-displayName: Bare Metal
  - name: Container as a Service
    x-displayName: Container as a Service
  - name: Cost Reports
    x-displayName: Cost Reports
  - name: DDoS Protection
    x-displayName: DDoS Protection
  - name: Everywhere Inference
    x-displayName: Everywhere Inference
  - name: Everywhere Inference Apps
    x-displayName: Everywhere Inference Apps
  - name: File Shares
    x-displayName: File Shares
  - name: Floating IPs
    x-displayName: Floating IPs
  - name: Function as a Service
    x-displayName: Function as a Service
  - name: GPU Bare Metal
    x-displayName: GPU Bare Metal
  - name: GPU Virtual
    x-displayName: GPU Virtual
  - name: IP Ranges
    x-displayName: IP Ranges
  - name: Images
    x-displayName: Images
  - name: Instances
    x-displayName: Instances
  - name: Load Balancers
    x-displayName: Load Balancers
  - name: Logging
    x-displayName: Logging
  - name: Managed Kubernetes
    x-displayName: Managed Kubernetes
  - name: Managed PostgreSQL
    x-displayName: Managed PostgreSQL
  - name: Networks
    x-displayName: Networks
  - name: Placement Groups
    x-displayName: Placement Groups
  - name: Projects
    x-displayName: Projects
  - name: Quotas
    x-displayName: Quotas
  - name: Regions
    x-displayName: Regions
  - name: Registry
    x-displayName: Registry
  - name: Reservations
    x-displayName: Reservations
  - name: Reserved IPs
    x-displayName: Reserved IPs
  - name: Routers
    x-displayName: Routers
  - name: SSH Keys
    x-displayName: SSH Keys
  - name: Secrets
    x-displayName: Secrets
  - name: Security Groups
    x-displayName: Security Groups
  - name: Snapshot Schedules
    x-displayName: Snapshot Schedules
  - name: Snapshots
    x-displayName: Snapshots
  - name: Tasks
    x-displayName: Tasks
  - name: User Actions
    x-displayName: User Actions
  - name: User Role Assignments
    x-displayName: User Role Assignments
  - name: Volumes
    x-displayName: Volumes
paths:
  /cloud/v2/loadbalancers/{project_id}/{region_id}/{load_balancer_id}:
    patch:
      tags:
        - Load Balancers
      summary: Update load balancer
      description: >-
        Rename load balancer, activate/deactivate logging, update preferred
        connectivity type,

        modify load balancer tags, and/or set `admin_state_up` to enable/disable
        the load balancer.

        The request will only process the fields that are provided in the
        request body.

        Any fields that are not included will remain unchanged.
      operationId: LoadBalancerInstanceViewSetV2.patch
      parameters:
        - in: path
          name: project_id
          required: true
          description: Project ID
          schema:
            description: Project ID
            example: 1
            examples:
              - 1
            title: Project Id
            type: integer
        - in: path
          name: region_id
          required: true
          description: Region ID
          schema:
            description: Region ID
            example: 1
            examples:
              - 1
            exclusiveMinimum: 0
            title: Region Id
            type: integer
        - in: path
          name: load_balancer_id
          required: true
          description: Load balancer ID
          schema:
            description: Load balancer ID
            example: 00000000-0000-4000-8000-000000000000
            examples:
              - 00000000-0000-4000-8000-000000000000
            format: uuid4
            title: Load Balancer Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LoadBalancerPatchSerializerV2'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskIDsSerializer'
components:
  schemas:
    LoadBalancerPatchSerializerV2:
      properties:
        admin_state_up:
          description: >-
            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.
          example: true
          examples:
            - true
            - false
          title: Admin State Up
          type: boolean
        logging:
          $ref: '#/components/schemas/LoadbalancerLoggingSerializer'
          description: Logging configuration
        name:
          description: Name.
          example: some_name
          examples:
            - some_name
          pattern: ^[a-zA-Z0-9][a-zA-Z 0-9._\-]{1,61}[a-zA-Z0-9._]$
          title: Name
          type: string
        preferred_connectivity:
          $ref: '#/components/schemas/MemberConnectivity'
          description: >-
            Preferred option to establish connectivity between load balancer and
            its pools members
          examples:
            - - L2
              - L3
        tags:
          anyOf:
            - $ref: '#/components/schemas/UpdateTagsSerializer'
            - type: 'null'
          description: >-
            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
      title: LoadBalancerPatchSerializerV2
      type: object
    TaskIDsSerializer:
      properties:
        tasks:
          description: >-
            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.
          example:
            - d478ae29-dedc-4869-82f0-96104425f565
          examples:
            - - d478ae29-dedc-4869-82f0-96104425f565
          items:
            type: string
          title: Tasks
          type: array
      required:
        - tasks
      title: TaskIDsSerializer
      type: object
    LoadbalancerLoggingSerializer:
      properties:
        destination_region_id:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          description: Destination region id to which the logs will be written
          examples:
            - 1
          title: Destination Region Id
        enabled:
          default: false
          description: Enable/disable forwarding logs to LaaS
          example: true
          examples:
            - true
            - false
          title: Enabled
          type: boolean
        retention_policy:
          anyOf:
            - $ref: '#/components/schemas/LaasIndexRetentionPolicyPydanticSerializer'
            - type: 'null'
          default: null
          description: The logs retention policy
          examples:
            - period: 45
        topic_name:
          anyOf:
            - maxLength: 223
              minLength: 1
              pattern: >-
                ^[a-z0-9](?:[-a-z0-9]*[a-z0-9])?(?:\.[a-z0-9](?:[-a-z0-9]*[a-z0-9])*)*$
              type: string
            - type: 'null'
          default: null
          description: The topic name to which the logs will be written
          examples:
            - my-log-name
          title: Topic Name
      title: LoadbalancerLoggingSerializer
      type: object
    MemberConnectivity:
      enum:
        - L2
        - L3
      title: MemberConnectivity
      type: string
    UpdateTagsSerializer:
      patternProperties:
        ^[^\s=]+$:
          anyOf:
            - maxLength: 255
              minLength: 1
              pattern: ^[^ \t\n\r\f\v]([^\t\n\r\f\v]*[^ \t\n\r\f\v])?$
              type: string
            - type: 'null'
          description: >-
            Tag value. Maximum 255 characters. Cannot contain tabs, newlines,
            empty string or start/end with whitespace. Set to `null` in order to
            delete this tag.
          examples:
            - my-tag-value
      propertyNames:
        description: >-
          Tag key. Maximum 255 characters. Cannot contain spaces, tabs,
          newlines, empty string or '=' character.
        examples:
          - my-tag
        maxLength: 255
        minLength: 1
      title: UpdateTagsSerializer
      type: object
    LaasIndexRetentionPolicyPydanticSerializer:
      properties:
        period:
          anyOf:
            - exclusiveMinimum: 0
              maximum: 1825
              type: integer
            - type: 'null'
          description: Duration of days for which logs must be kept.
          examples:
            - 45
          title: Period
      required:
        - period
      title: LaasIndexRetentionPolicyPydanticSerializer
      type: object
  securitySchemes:
    APIKey:
      description: >-
        API key for authentication. Make sure to include the word `apikey`,
        followed by a single space and then your token.

        Example: `apikey 1234$abcdef`
      type: apiKey
      in: header
      name: Authorization

````