curl --request POST \
--url https://api.gcore.com/cloud/v1/caas/{project_id}/{region_id}/check_limits \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"flavor": "250mCPU-512MiB",
"max_replicas": 13
}
'import requests
url = "https://api.gcore.com/cloud/v1/caas/{project_id}/{region_id}/check_limits"
payload = {
"flavor": "250mCPU-512MiB",
"max_replicas": 13
}
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({flavor: '250mCPU-512MiB', max_replicas: 13})
};
fetch('https://api.gcore.com/cloud/v1/caas/{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/caas/{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([
'flavor' => '250mCPU-512MiB',
'max_replicas' => 13
]),
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/caas/{project_id}/{region_id}/check_limits"
payload := strings.NewReader("{\n \"flavor\": \"250mCPU-512MiB\",\n \"max_replicas\": 13\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/caas/{project_id}/{region_id}/check_limits")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"flavor\": \"250mCPU-512MiB\",\n \"max_replicas\": 13\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cloud/v1/caas/{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 \"flavor\": \"250mCPU-512MiB\",\n \"max_replicas\": 13\n}"
response = http.request(request)
puts response.read_body{
"caas_container_count_limit": 5,
"caas_container_count_requested": 1,
"caas_container_count_usage": 5,
"caas_cpu_count_limit": 10,
"caas_cpu_count_requested": 20,
"caas_cpu_count_usage": 5,
"caas_gpu_count_limit": 4,
"caas_gpu_count_requested": 8,
"caas_gpu_count_usage": 2,
"caas_ram_size_limit": 2048,
"caas_ram_size_requested": 4096,
"caas_ram_size_usage": 1024
}Check container quota
Check if regional quota is exceeded, if yes the number of additional quotas needed to create the specified cluster will be calculated.
curl --request POST \
--url https://api.gcore.com/cloud/v1/caas/{project_id}/{region_id}/check_limits \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"flavor": "250mCPU-512MiB",
"max_replicas": 13
}
'import requests
url = "https://api.gcore.com/cloud/v1/caas/{project_id}/{region_id}/check_limits"
payload = {
"flavor": "250mCPU-512MiB",
"max_replicas": 13
}
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({flavor: '250mCPU-512MiB', max_replicas: 13})
};
fetch('https://api.gcore.com/cloud/v1/caas/{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/caas/{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([
'flavor' => '250mCPU-512MiB',
'max_replicas' => 13
]),
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/caas/{project_id}/{region_id}/check_limits"
payload := strings.NewReader("{\n \"flavor\": \"250mCPU-512MiB\",\n \"max_replicas\": 13\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/caas/{project_id}/{region_id}/check_limits")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"flavor\": \"250mCPU-512MiB\",\n \"max_replicas\": 13\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cloud/v1/caas/{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 \"flavor\": \"250mCPU-512MiB\",\n \"max_replicas\": 13\n}"
response = http.request(request)
puts response.read_body{
"caas_container_count_limit": 5,
"caas_container_count_requested": 1,
"caas_container_count_usage": 5,
"caas_cpu_count_limit": 10,
"caas_cpu_count_requested": 20,
"caas_cpu_count_usage": 5,
"caas_gpu_count_limit": 4,
"caas_gpu_count_requested": 8,
"caas_gpu_count_usage": 2,
"caas_ram_size_limit": 2048,
"caas_ram_size_requested": 4096,
"caas_ram_size_usage": 1024
}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
1
Body
Response
OK
Exceeded quota fields, present only when regional limits would be violated.
An empty response means no quotas are exceeded.
Containers count limit
5
Containers count requested
1
Containers count usage
5
Containers CPU count limit, mCPU
10
Containers CPU count requested, mCPU
20
Containers CPU count usage, mCPU
5
Containers GPU count limit
4
Containers GPU count requested
8
Containers GPU count usage
2
Containers RAM size limit, MiB
2048
Containers RAM size requested, MiB
4096
Containers RAM size usage, MiB
1024
Was this page helpful?