> ## 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 listener



## OpenAPI

````yaml /api-reference/services_documented/cloud_api.yaml patch /cloud/v2/lblisteners/{project_id}/{region_id}/{listener_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/lblisteners/{project_id}/{region_id}/{listener_id}:
    patch:
      tags:
        - Load Balancers
      summary: Update load balancer listener
      operationId: LoadBalancerListenerInstanceViewSetV2.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: listener_id
          required: true
          description: Listener ID
          schema:
            description: Listener ID
            example: 00000000-0000-4000-8000-000000000000
            examples:
              - 00000000-0000-4000-8000-000000000000
            format: uuid4
            title: Listener Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchLbListenerSerializer'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskIDsSerializer'
      x-codeSamples:
        - lang: Python
          source: |-
            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.listeners.update(
                listener_id="00000000-0000-4000-8000-000000000000",
                project_id=1,
                region_id=1,
            )
            print(task_id_list.tasks)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/G-Core/gcore-go\"\n\t\"github.com/G-Core/gcore-go/cloud\"\n\t\"github.com/G-Core/gcore-go/option\"\n)\n\nfunc main() {\n\tclient := gcore.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\ttaskIDList, err := client.Cloud.LoadBalancers.Listeners.Update(\n\t\tcontext.TODO(),\n\t\t\"00000000-0000-4000-8000-000000000000\",\n\t\tcloud.LoadBalancerListenerUpdateParams{\n\t\t\tProjectID: gcore.Int(1),\n\t\t\tRegionID:  gcore.Int(1),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", taskIDList.Tasks)\n}\n"
components:
  schemas:
    PatchLbListenerSerializer:
      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
        allowed_cidrs:
          anyOf:
            - items:
                format: ipvanynetwork
                type: string
              maxItems: 100
              type: array
            - type: 'null'
          description: Network CIDRs from which service will be accessible
          examples:
            - - 10.0.0.0/8
          title: Allowed Cidrs
        connection_limit:
          description: >-
            Limit of simultaneous connections. If -1 is provided, it is
            translated to the default value 100000.
          example: 100000
          examples:
            - 100000
          maximum: 1000000
          minimum: -1
          title: Connection Limit
          type: integer
        name:
          description: Load balancer listener name
          example: new_listener_name
          examples:
            - new_listener_name
          pattern: ^[a-zA-Z0-9][a-zA-Z 0-9._\-]{1,61}[a-zA-Z0-9._]$
          title: Name
          type: string
        secret_id:
          anyOf:
            - format: uuid4
              type: string
            - type: 'null'
          description: >-
            ID of the secret where PKCS12 file is stored for `TERMINATED_HTTPS`
            or PROMETHEUS load balancer
          examples:
            - af4a64e7-03ca-470f-9a09-b77d54c5abd8
          title: Secret Id
        sni_secret_id:
          anyOf:
            - items:
                format: uuid4
                type: string
              type: array
            - type: 'null'
          description: >-
            List of secret's ID containing PKCS12 format certificate/key
            bundfles for `TERMINATED_HTTPS` or PROMETHEUS listeners
          examples:
            - - af4a64e7-03ca-470f-9a09-b77d54c5abd8
              - 12b43d95-d420-4c79-a883-49bf146cbdff
          title: Sni Secret Id
          x-stainless-terraform-configurability: computed_optional
        timeout_client_data:
          anyOf:
            - maximum: 86400000
              minimum: 0
              type: integer
            - type: 'null'
          description: Frontend client inactivity timeout in milliseconds
          examples:
            - 50000
          title: Timeout Client Data
          x-stainless-terraform-configurability: computed_optional
        timeout_member_connect:
          anyOf:
            - maximum: 86400000
              minimum: 0
              type: integer
            - type: 'null'
          deprecated: true
          description: >-
            Backend member connection timeout in milliseconds. We are
            recommending to use `pool.timeout_member_connect` instead.
          examples:
            - 50000
          title: Timeout Member Connect
          x-stainless-terraform-configurability: computed_optional
        timeout_member_data:
          anyOf:
            - maximum: 86400000
              minimum: 0
              type: integer
            - type: 'null'
          deprecated: true
          description: >-
            Backend member inactivity timeout in milliseconds. We are
            recommending to use `pool.timeout_member_data` instead.
          examples:
            - null
          title: Timeout Member Data
          x-stainless-terraform-configurability: computed_optional
        user_list:
          anyOf:
            - items:
                $ref: '#/components/schemas/UserListItem'
              maxItems: 3
              type: array
            - type: 'null'
          description: Load balancer listener users list
          examples:
            - - encrypted_password: >-
                  $5$isRr.HJ1IrQP38.m$oViu3DJOpUG2ZsjCBtbITV3mqpxxbZfyWJojLPNSPO5
                username: admin
          title: User List
      title: PatchLbListenerSerializer
      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
    UserListItem:
      properties:
        encrypted_password:
          description: Encrypted password to auth via Basic Authentication
          example: $5$isRr.HJ1IrQP38.m$oViu3DJOpUG2ZsjCBtbITV3mqpxxbZfyWJojLPNSPO5
          examples:
            - $5$isRr.HJ1IrQP38.m$oViu3DJOpUG2ZsjCBtbITV3mqpxxbZfyWJojLPNSPO5
          maxLength: 128
          title: Encrypted Password
          type: string
        username:
          description: Username to auth via Basic Authentication
          example: admin
          examples:
            - admin
          maxLength: 32
          pattern: ^[a-zA-Z0-9][a-zA-Z 0-9._\-]{1,30}[a-zA-Z0-9._]$
          title: Username
          type: string
      required:
        - username
        - encrypted_password
      title: UserListItem
      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

````