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_status_list = client.cloud.load_balancers.statuses.list(
project_id=0,
region_id=0,
)
print(load_balancer_status_list.count)
{
"count": 1,
"results": [
{
"id": "00000000-0000-4000-8000-000000000000",
"listeners": [
{
"id": "00000000-0000-4000-8000-000000000000",
"name": "My Load Balancer Listener",
"operating_status": "ONLINE",
"pools": [
{
"health_monitor": {
"id": "00000000-0000-4000-8000-000000000000",
"operating_status": "ONLINE",
"provisioning_status": "ACTIVE",
"type": "HTTP"
},
"id": "00000000-0000-4000-8000-000000000000",
"members": [
{
"address": "95.85.95.85",
"id": "00000000-0000-4000-8000-000000000000",
"operating_status": "ONLINE",
"protocol_port": 53,
"provisioning_status": "ACTIVE"
}
],
"name": "My Load Balancer Pool",
"operating_status": "ONLINE",
"provisioning_status": "ACTIVE"
}
],
"provisioning_status": "ACTIVE"
}
],
"name": "My Load Balancer",
"operating_status": "ONLINE",
"provisioning_status": "ACTIVE",
"tags": [
{
"key": "my-tag",
"read_only": false,
"value": "my-tag-value"
}
]
}
]
}
API key for authentication. Make sure to include the word apikey
, followed by a single space and then your token.
Example: apikey 1234$abcdef
List of load balancers statuses with all their entities
The response is of type object
.
Was this page helpful?
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_status_list = client.cloud.load_balancers.statuses.list(
project_id=0,
region_id=0,
)
print(load_balancer_status_list.count)
{
"count": 1,
"results": [
{
"id": "00000000-0000-4000-8000-000000000000",
"listeners": [
{
"id": "00000000-0000-4000-8000-000000000000",
"name": "My Load Balancer Listener",
"operating_status": "ONLINE",
"pools": [
{
"health_monitor": {
"id": "00000000-0000-4000-8000-000000000000",
"operating_status": "ONLINE",
"provisioning_status": "ACTIVE",
"type": "HTTP"
},
"id": "00000000-0000-4000-8000-000000000000",
"members": [
{
"address": "95.85.95.85",
"id": "00000000-0000-4000-8000-000000000000",
"operating_status": "ONLINE",
"protocol_port": 53,
"provisioning_status": "ACTIVE"
}
],
"name": "My Load Balancer Pool",
"operating_status": "ONLINE",
"provisioning_status": "ACTIVE"
}
],
"provisioning_status": "ACTIVE"
}
],
"name": "My Load Balancer",
"operating_status": "ONLINE",
"provisioning_status": "ACTIVE",
"tags": [
{
"key": "my-tag",
"read_only": false,
"value": "my-tag-value"
}
]
}
]
}
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_status_list = client.cloud.load_balancers.statuses.list(
project_id=0,
region_id=0,
)
print(load_balancer_status_list.count)
{
"count": 1,
"results": [
{
"id": "00000000-0000-4000-8000-000000000000",
"listeners": [
{
"id": "00000000-0000-4000-8000-000000000000",
"name": "My Load Balancer Listener",
"operating_status": "ONLINE",
"pools": [
{
"health_monitor": {
"id": "00000000-0000-4000-8000-000000000000",
"operating_status": "ONLINE",
"provisioning_status": "ACTIVE",
"type": "HTTP"
},
"id": "00000000-0000-4000-8000-000000000000",
"members": [
{
"address": "95.85.95.85",
"id": "00000000-0000-4000-8000-000000000000",
"operating_status": "ONLINE",
"protocol_port": 53,
"provisioning_status": "ACTIVE"
}
],
"name": "My Load Balancer Pool",
"operating_status": "ONLINE",
"provisioning_status": "ACTIVE"
}
],
"provisioning_status": "ACTIVE"
}
],
"name": "My Load Balancer",
"operating_status": "ONLINE",
"provisioning_status": "ACTIVE",
"tags": [
{
"key": "my-tag",
"read_only": false,
"value": "my-tag-value"
}
]
}
]
}
API key for authentication. Make sure to include the word apikey
, followed by a single space and then your token.
Example: apikey 1234$abcdef
List of load balancers statuses with all their entities
The response is of type object
.
Was this page helpful?
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_status_list = client.cloud.load_balancers.statuses.list(
project_id=0,
region_id=0,
)
print(load_balancer_status_list.count)
{
"count": 1,
"results": [
{
"id": "00000000-0000-4000-8000-000000000000",
"listeners": [
{
"id": "00000000-0000-4000-8000-000000000000",
"name": "My Load Balancer Listener",
"operating_status": "ONLINE",
"pools": [
{
"health_monitor": {
"id": "00000000-0000-4000-8000-000000000000",
"operating_status": "ONLINE",
"provisioning_status": "ACTIVE",
"type": "HTTP"
},
"id": "00000000-0000-4000-8000-000000000000",
"members": [
{
"address": "95.85.95.85",
"id": "00000000-0000-4000-8000-000000000000",
"operating_status": "ONLINE",
"protocol_port": 53,
"provisioning_status": "ACTIVE"
}
],
"name": "My Load Balancer Pool",
"operating_status": "ONLINE",
"provisioning_status": "ACTIVE"
}
],
"provisioning_status": "ACTIVE"
}
],
"name": "My Load Balancer",
"operating_status": "ONLINE",
"provisioning_status": "ACTIVE",
"tags": [
{
"key": "my-tag",
"read_only": false,
"value": "my-tag-value"
}
]
}
]
}