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_listener_list = client.cloud.load_balancers.listeners.list(
project_id=1,
region_id=1,
)
print(load_balancer_listener_list.count){
"count": 1,
"results": [
{
"allowed_cidrs": [
"10.0.0.0/8"
],
"connection_limit": 499999,
"creator_task_id": "de105b9c-c095-4f1c-9b76-aaa9bc60e32a",
"id": "<string>",
"insert_headers": {},
"load_balancer_id": "67149a91-739b-42bf-bbd1-cb64f723dad7",
"name": "<string>",
"operating_status": "DEGRADED",
"pool_count": 1,
"protocol": "HTTP",
"protocol_port": 32768,
"provisioning_status": "ACTIVE",
"secret_id": "e36200c7-114b-44e6-ba1a-043b2bd53879",
"sni_secret_id": [
"e36200c7-114b-44e6-ba1a-043b2bd53879",
"c5d156ce-0925-4aef-b458-cce46bd346f0"
],
"stats": {
"active_connections": 0,
"bytes_in": 34942398609,
"bytes_out": 304777113641,
"request_errors": 4,
"total_connections": 21095970
},
"task_id": "<string>",
"timeout_client_data": 50000,
"timeout_member_connect": 5000,
"timeout_member_data": 50000,
"user_list": [
{
"encrypted_password": "<string>",
"username": "<string>"
}
]
}
]
}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_listener_list = client.cloud.load_balancers.listeners.list(
project_id=1,
region_id=1,
)
print(load_balancer_listener_list.count){
"count": 1,
"results": [
{
"allowed_cidrs": [
"10.0.0.0/8"
],
"connection_limit": 499999,
"creator_task_id": "de105b9c-c095-4f1c-9b76-aaa9bc60e32a",
"id": "<string>",
"insert_headers": {},
"load_balancer_id": "67149a91-739b-42bf-bbd1-cb64f723dad7",
"name": "<string>",
"operating_status": "DEGRADED",
"pool_count": 1,
"protocol": "HTTP",
"protocol_port": 32768,
"provisioning_status": "ACTIVE",
"secret_id": "e36200c7-114b-44e6-ba1a-043b2bd53879",
"sni_secret_id": [
"e36200c7-114b-44e6-ba1a-043b2bd53879",
"c5d156ce-0925-4aef-b458-cce46bd346f0"
],
"stats": {
"active_connections": 0,
"bytes_in": 34942398609,
"bytes_out": 304777113641,
"request_errors": 4,
"total_connections": 21095970
},
"task_id": "<string>",
"timeout_client_data": 50000,
"timeout_member_connect": 5000,
"timeout_member_data": 50000,
"user_list": [
{
"encrypted_password": "<string>",
"username": "<string>"
}
]
}
]
}API key for authentication. Make sure to include the word apikey, followed by a single space and then your token.
Example: apikey 1234$abcdef
Load Balancer ID
Show stats
OK
Number of objects
x >= 0Objects
Show child attributes
Network CIDRs from which service will be accessible
["10.0.0.0/8"]Limit of simultaneous connections
-1 <= x <= 1000000Task that created this entity
"de105b9c-c095-4f1c-9b76-aaa9bc60e32a"
Load balancer listener ID
Dictionary of additional header insertion into HTTP headers. Only used with HTTP and TERMINATED_HTTPS protocols.
Load balancer ID
"67149a91-739b-42bf-bbd1-cb64f723dad7"
Load balancer listener name
Listener operating status
DEGRADED, DRAINING, ERROR, NO_MONITOR, OFFLINE, ONLINE Number of pools (for UI)
1
Load balancer protocol
HTTP, HTTPS, PROMETHEUS, TCP, TERMINATED_HTTPS, UDP Protocol port
1 <= x <= 65535Listener lifecycle status
ACTIVE, DELETED, ERROR, PENDING_CREATE, PENDING_DELETE, PENDING_UPDATE ID of the secret where PKCS12 file is stored for TERMINATED_HTTPS or PROMETHEUS load balancer
"e36200c7-114b-44e6-ba1a-043b2bd53879"
List of secret's ID containing PKCS12 format certificate/key bundles for TERMINATED_HTTPS or PROMETHEUS listeners
[
"e36200c7-114b-44e6-ba1a-043b2bd53879",
"c5d156ce-0925-4aef-b458-cce46bd346f0"
]Statistics of the load balancer. It is available only in get functions by a flag.
Show child attributes
Currently active connections
Total bytes received
Total bytes sent
Total requests that were unable to be fulfilled
Total connections handled
{
"active_connections": 0,
"bytes_in": 34942398609,
"bytes_out": 304777113641,
"request_errors": 4,
"total_connections": 21095970
}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.
Frontend client inactivity timeout in milliseconds
0 <= x <= 8640000050000
Backend member connection timeout in milliseconds
0 <= x <= 864000005000
Backend member inactivity timeout in milliseconds
0 <= x <= 8640000050000
Was this page helpful?