from gcore import Gcore
client = Gcore(
api_key="My API Key",
)
load_balancer_l7_rule_list = client.cloud.load_balancers.l7_policies.rules.list(
l7policy_id="l7policy_id",
project_id=0,
region_id=0,
)
print(load_balancer_l7_rule_list.count)
{
"count": 1,
"results": [
{
"compare_type": "STARTS_WITH",
"created_at": "2020-11-16T13:48:25+0000",
"id": "0ca7bebd-7a54-4977-bca7-e4ac1e612ec7",
"invert": false,
"key": "key",
"operating_status": "ONLINE",
"project_id": 1,
"provisioning_status": "ACTIVE",
"region": "Luxembourg",
"region_id": 1,
"tags": [
"test_tag"
],
"type": "PATH",
"updated_at": "2020-11-16T13:48:26+0000",
"value": "/images*"
}
]
}
from gcore import Gcore
client = Gcore(
api_key="My API Key",
)
load_balancer_l7_rule_list = client.cloud.load_balancers.l7_policies.rules.list(
l7policy_id="l7policy_id",
project_id=0,
region_id=0,
)
print(load_balancer_l7_rule_list.count)
{
"count": 1,
"results": [
{
"compare_type": "STARTS_WITH",
"created_at": "2020-11-16T13:48:25+0000",
"id": "0ca7bebd-7a54-4977-bca7-e4ac1e612ec7",
"invert": false,
"key": "key",
"operating_status": "ONLINE",
"project_id": 1,
"provisioning_status": "ACTIVE",
"region": "Luxembourg",
"region_id": 1,
"tags": [
"test_tag"
],
"type": "PATH",
"updated_at": "2020-11-16T13:48:26+0000",
"value": "/images*"
}
]
}
API key for authentication. Make sure to include the word apikey
, followed by a single space and then your token.
Example: apikey 1234$abcdef
Project ID
Region ID
L7 policy ID
Returned L7 rules
The response is of type object
.
Was this page helpful?