Skip to main content
POST
/
cloud
/
v1
/
lblisteners
/
{project_id}
/
{region_id}
Create load balancer listener
curl --request POST \
  --url https://api.gcore.com/cloud/v1/lblisteners/{project_id}/{region_id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "load_balancer_id": "30f4f55b-4a7c-48e0-9954-5cddfee216e7",
  "name": "my_listener",
  "protocol_port": 80,
  "allowed_cidrs": [
    "10.0.0.0/8"
  ],
  "connection_limit": 100000,
  "default_pool_id": "00000000-0000-4000-8000-000000000000",
  "insert_x_forwarded": false,
  "secret_id": "f2e734d0-fa2b-42c2-ad33-4c6db5101e00",
  "sni_secret_id": [
    "f2e734d0-fa2b-42c2-ad33-4c6db5101e00",
    "eb121225-7ded-4ff3-ae1f-599e145dd7cb"
  ],
  "timeout_client_data": 50000,
  "timeout_member_connect": 50000,
  "timeout_member_data": null,
  "user_list": [
    {
      "encrypted_password": "$5$isRr.HJ1IrQP38.m$oViu3DJOpUG2ZsjCBtbITV3mqpxxbZfyWJojLPNSPO5",
      "username": "admin"
    }
  ]
}
'
{
  "tasks": [
    "d478ae29-dedc-4869-82f0-96104425f565"
  ]
}

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.

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

Example:

1

region_id
integer
required

Region ID

Example:

1

Body

application/json
load_balancer_id
string<uuid4>
required

ID of already existent Load Balancer.

Example:

"30f4f55b-4a7c-48e0-9954-5cddfee216e7"

name
string
required

Load balancer listener name

Pattern: ^[a-zA-Z0-9][a-zA-Z 0-9._\-]{1,61}[a-zA-Z0-9._]$
Example:

"my_listener"

protocol
enum<string>
required

Load balancer listener protocol

Available options:
HTTP,
HTTPS,
PROMETHEUS,
TCP,
TERMINATED_HTTPS,
UDP
Example:

"HTTP"

protocol_port
integer
required

Protocol port

Required range: 1 <= x <= 65535
Example:

80

allowed_cidrs
string<ipvanynetwork>[] | null

Network CIDRs from which service will be accessible

Maximum array length: 100
Example:
["10.0.0.0/8"]
connection_limit
integer
default:100000

Limit of the simultaneous connections. If -1 is provided, it is translated to the default value 100000.

Required range: -1 <= x <= 1000000
Example:

100000

default_pool_id
string<uuid4>

ID of already existent Load Balancer Pool to attach listener to.

Example:

"00000000-0000-4000-8000-000000000000"

insert_x_forwarded
boolean

Add headers X-Forwarded-For, X-Forwarded-Port, X-Forwarded-Proto to requests. Only used with HTTP or TERMINATED_HTTPS protocols.

Example:

false

secret_id

ID of the secret where PKCS12 file is stored for TERMINATED_HTTPS or PROMETHEUS listener

Allowed value: ""
Example:

"f2e734d0-fa2b-42c2-ad33-4c6db5101e00"

sni_secret_id
string<uuid4>[]

List of secrets IDs containing PKCS12 format certificate/key bundles for TERMINATED_HTTPS or PROMETHEUS listeners

Example:
[
"f2e734d0-fa2b-42c2-ad33-4c6db5101e00",
"eb121225-7ded-4ff3-ae1f-599e145dd7cb"
]
timeout_client_data
integer | null

Frontend client inactivity timeout in milliseconds

Required range: 0 <= x <= 86400000
Example:

50000

timeout_member_connect
integer | null
deprecated

Backend member connection timeout in milliseconds. We are recommending to use pool.timeout_member_connect instead.

Required range: 0 <= x <= 86400000
Example:

50000

timeout_member_data
integer | null
deprecated

Backend member inactivity timeout in milliseconds. We are recommending to use pool.timeout_member_data instead.

Required range: 0 <= x <= 86400000
Example:

null

user_list
UserListItem · object[]

Load balancer listener list of username and encrypted password items

Maximum array length: 3
Example:
[
{
"encrypted_password": "$5$isRr.HJ1IrQP38.m$oViu3DJOpUG2ZsjCBtbITV3mqpxxbZfyWJojLPNSPO5",
"username": "admin"
}
]

Response

200 - application/json

OK

tasks
string[]
required

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"]