curl --request POST \
--url https://api.gcore.com/cloud/v1/loadbalancers/{project_id}/{region_id}/check_limits \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"logging": {
"destination_region_id": 1,
"enabled": true,
"retention_policy": {
"period": 45
},
"topic_name": "my-log-name"
},
"vip_ip_family": "ipv4",
"vip_network_id": "<string>",
"vip_port_id": "ff83e13a-b256-4be2-ba5d-028d3f0ab450"
}
'import requests
url = "https://api.gcore.com/cloud/v1/loadbalancers/{project_id}/{region_id}/check_limits"
payload = {
"logging": {
"destination_region_id": 1,
"enabled": True,
"retention_policy": { "period": 45 },
"topic_name": "my-log-name"
},
"vip_ip_family": "ipv4",
"vip_network_id": "<string>",
"vip_port_id": "ff83e13a-b256-4be2-ba5d-028d3f0ab450"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
logging: {
destination_region_id: 1,
enabled: true,
retention_policy: {period: 45},
topic_name: 'my-log-name'
},
vip_ip_family: 'ipv4',
vip_network_id: '<string>',
vip_port_id: 'ff83e13a-b256-4be2-ba5d-028d3f0ab450'
})
};
fetch('https://api.gcore.com/cloud/v1/loadbalancers/{project_id}/{region_id}/check_limits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gcore.com/cloud/v1/loadbalancers/{project_id}/{region_id}/check_limits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'logging' => [
'destination_region_id' => 1,
'enabled' => true,
'retention_policy' => [
'period' => 45
],
'topic_name' => 'my-log-name'
],
'vip_ip_family' => 'ipv4',
'vip_network_id' => '<string>',
'vip_port_id' => 'ff83e13a-b256-4be2-ba5d-028d3f0ab450'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gcore.com/cloud/v1/loadbalancers/{project_id}/{region_id}/check_limits"
payload := strings.NewReader("{\n \"logging\": {\n \"destination_region_id\": 1,\n \"enabled\": true,\n \"retention_policy\": {\n \"period\": 45\n },\n \"topic_name\": \"my-log-name\"\n },\n \"vip_ip_family\": \"ipv4\",\n \"vip_network_id\": \"<string>\",\n \"vip_port_id\": \"ff83e13a-b256-4be2-ba5d-028d3f0ab450\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.gcore.com/cloud/v1/loadbalancers/{project_id}/{region_id}/check_limits")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"logging\": {\n \"destination_region_id\": 1,\n \"enabled\": true,\n \"retention_policy\": {\n \"period\": 45\n },\n \"topic_name\": \"my-log-name\"\n },\n \"vip_ip_family\": \"ipv4\",\n \"vip_network_id\": \"<string>\",\n \"vip_port_id\": \"ff83e13a-b256-4be2-ba5d-028d3f0ab450\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cloud/v1/loadbalancers/{project_id}/{region_id}/check_limits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"logging\": {\n \"destination_region_id\": 1,\n \"enabled\": true,\n \"retention_policy\": {\n \"period\": 45\n },\n \"topic_name\": \"my-log-name\"\n },\n \"vip_ip_family\": \"ipv4\",\n \"vip_network_id\": \"<string>\",\n \"vip_port_id\": \"ff83e13a-b256-4be2-ba5d-028d3f0ab450\"\n}"
response = http.request(request)
puts response.read_body{
"external_ip_count_limit": 1,
"external_ip_count_requested": 1,
"external_ip_count_usage": 1,
"floating_count_limit": 1,
"floating_count_requested": 1,
"floating_count_usage": 1,
"laas_topic_count_limit": 1,
"laas_topic_count_requested": 1,
"laas_topic_count_usage": 1,
"loadbalancer_count_limit": 1,
"loadbalancer_count_requested": 1,
"loadbalancer_count_usage": 1
}Check load balancer quota
Check if regional quota is exceeded, if yes the number of additional quotas needed to create the specified load balancer will be calculated
curl --request POST \
--url https://api.gcore.com/cloud/v1/loadbalancers/{project_id}/{region_id}/check_limits \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"logging": {
"destination_region_id": 1,
"enabled": true,
"retention_policy": {
"period": 45
},
"topic_name": "my-log-name"
},
"vip_ip_family": "ipv4",
"vip_network_id": "<string>",
"vip_port_id": "ff83e13a-b256-4be2-ba5d-028d3f0ab450"
}
'import requests
url = "https://api.gcore.com/cloud/v1/loadbalancers/{project_id}/{region_id}/check_limits"
payload = {
"logging": {
"destination_region_id": 1,
"enabled": True,
"retention_policy": { "period": 45 },
"topic_name": "my-log-name"
},
"vip_ip_family": "ipv4",
"vip_network_id": "<string>",
"vip_port_id": "ff83e13a-b256-4be2-ba5d-028d3f0ab450"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
logging: {
destination_region_id: 1,
enabled: true,
retention_policy: {period: 45},
topic_name: 'my-log-name'
},
vip_ip_family: 'ipv4',
vip_network_id: '<string>',
vip_port_id: 'ff83e13a-b256-4be2-ba5d-028d3f0ab450'
})
};
fetch('https://api.gcore.com/cloud/v1/loadbalancers/{project_id}/{region_id}/check_limits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gcore.com/cloud/v1/loadbalancers/{project_id}/{region_id}/check_limits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'logging' => [
'destination_region_id' => 1,
'enabled' => true,
'retention_policy' => [
'period' => 45
],
'topic_name' => 'my-log-name'
],
'vip_ip_family' => 'ipv4',
'vip_network_id' => '<string>',
'vip_port_id' => 'ff83e13a-b256-4be2-ba5d-028d3f0ab450'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gcore.com/cloud/v1/loadbalancers/{project_id}/{region_id}/check_limits"
payload := strings.NewReader("{\n \"logging\": {\n \"destination_region_id\": 1,\n \"enabled\": true,\n \"retention_policy\": {\n \"period\": 45\n },\n \"topic_name\": \"my-log-name\"\n },\n \"vip_ip_family\": \"ipv4\",\n \"vip_network_id\": \"<string>\",\n \"vip_port_id\": \"ff83e13a-b256-4be2-ba5d-028d3f0ab450\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.gcore.com/cloud/v1/loadbalancers/{project_id}/{region_id}/check_limits")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"logging\": {\n \"destination_region_id\": 1,\n \"enabled\": true,\n \"retention_policy\": {\n \"period\": 45\n },\n \"topic_name\": \"my-log-name\"\n },\n \"vip_ip_family\": \"ipv4\",\n \"vip_network_id\": \"<string>\",\n \"vip_port_id\": \"ff83e13a-b256-4be2-ba5d-028d3f0ab450\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cloud/v1/loadbalancers/{project_id}/{region_id}/check_limits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"logging\": {\n \"destination_region_id\": 1,\n \"enabled\": true,\n \"retention_policy\": {\n \"period\": 45\n },\n \"topic_name\": \"my-log-name\"\n },\n \"vip_ip_family\": \"ipv4\",\n \"vip_network_id\": \"<string>\",\n \"vip_port_id\": \"ff83e13a-b256-4be2-ba5d-028d3f0ab450\"\n}"
response = http.request(request)
puts response.read_body{
"external_ip_count_limit": 1,
"external_ip_count_requested": 1,
"external_ip_count_usage": 1,
"floating_count_limit": 1,
"floating_count_requested": 1,
"floating_count_usage": 1,
"laas_topic_count_limit": 1,
"laas_topic_count_requested": 1,
"laas_topic_count_usage": 1,
"loadbalancer_count_limit": 1,
"loadbalancer_count_requested": 1,
"loadbalancer_count_usage": 1
}Authorizations
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
1
Region ID
7
Body
Floating IP configuration for assignment
Show child attributes
Show child attributes
Logging configuration
Show child attributes
Show child attributes
IP family for load balancer subnet auto-selection if vip_network_id is specified
dual, ipv4, ipv6 "ipv4"
Network ID for load balancer
Existing Reserved Fixed IP port ID for load balancer. Mutually exclusive with vip_network_id
"ff83e13a-b256-4be2-ba5d-028d3f0ab450"
Response
OK
External IP Count limit
1
External IP Count requested
1
External IP Count usage
1
Floating IP Count limit
1
Floating IP Count requested
1
Floating IP Count usage
1
LaaS Topics Count limit
1
LaaS Topics Count requested
1
LaaS Topics Count usage
1
Load Balancers Count limit
1
Load Balancers Count requested
1
Load Balancers Count usage
1
Was this page helpful?