> ## Documentation Index
> Fetch the complete documentation index at: https://gcore.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage resource quotas

export const MethodSection = ({children}) => children ?? null;

export const MethodSwitch = ({children}) => {
  const tabs = React.Children.toArray(children).map(c => {
    if (!c || !c.props) return null;
    if (c.props.id) return c;
    const inner = c.props.children;
    if (inner && inner.props && inner.props.id) return inner;
    return null;
  }).filter(Boolean);
  const firstId = tabs.length > 0 ? tabs[0].props.id : "";
  const [active, setActive] = React.useState(firstId);
  React.useEffect(() => {
    try {
      const saved = localStorage.getItem("gcore_docs_method");
      if (saved && tabs.find(t => t.props.id === saved)) {
        setActive(saved);
      }
    } catch (_) {}
  }, []);
  React.useEffect(() => {
    try {
      document.querySelectorAll("h2[id], h3[id]").forEach(heading => {
        const visible = heading.offsetParent !== null;
        document.querySelectorAll(`a[href="#${heading.id}"]`).forEach(link => {
          if (link.closest("h1,h2,h3,h4,h5,h6")) return;
          const li = link.closest("li");
          if (li) li.style.display = visible ? "" : "none";
        });
      });
    } catch (_) {}
    window.dispatchEvent(new Event("scroll"));
  }, [active]);
  const handleClick = id => {
    setActive(id);
    try {
      localStorage.setItem("gcore_docs_method", id);
    } catch (_) {}
  };
  return <div>
      <div className="not-prose flex gap-0 border-b border-zinc-200 dark:border-zinc-800 mb-8 mt-2" role="tablist">
        {tabs.map(tab => {
    const isActive = active === tab.props.id;
    return <button key={tab.props.id} role="tab" aria-selected={isActive} onClick={() => handleClick(tab.props.id)} className={["px-4 py-2 text-sm font-medium border-b-2 -mb-px transition-colors cursor-pointer", isActive ? "border-primary text-primary" : "border-transparent text-zinc-500 hover:text-zinc-800 dark:hover:text-zinc-200"].join(" ")}>
              {tab.props.label}
            </button>;
  })}
      </div>

      {tabs.map(tab => <div key={tab.props.id} style={{
    display: active === tab.props.id ? "" : "none"
  }}>
          {tab.props.children}
        </div>)}
    </div>;
};

<MethodSwitch>
  <MethodSection id="portal" label="Customer Portal">
    <p>Each Gcore Cloud region enforces per-account quotas on resource counts. The **Account Quotas** page shows current usage against limits for every resource type and accepts increase requests. Limit changes don't affect billing — only consumed resources are charged.</p>

    <p>Quotas are organized into collapsible service groups:</p>

    * Compute Service
    * Storage
    * Network Service
    * Load Balancer Service
    * Kubernetes Service
    * GPU Cloud
    * Functions Service
    * Containers service
    * Container Registry
    * Logging Service
    * Database Service

    ## Check quota

    <p>1. In the [Gcore Customer Portal](https://portal.gcore.com), go to **Cloud** in the left sidebar, then open **Cloud Management** and select **Quotas Viewer**.</p>

    <Frame>
      <img src="https://mintcdn.com/gcore/u5b7ufmmyXCdvCCK/images/docs/cloud/getting-started/request-a-quota-increase/request-quotas-region-selector.png?fit=max&auto=format&n=u5b7ufmmyXCdvCCK&q=85&s=d420220d6305ae3bdba1df2fe771a1dd" alt="Account Quotas page with region selector tabs and collapsible service groups" width="1400" height="900" data-path="images/docs/cloud/getting-started/request-a-quota-increase/request-quotas-region-selector.png" />
    </Frame>

    <p>2. Select a region using the tabs at the top (**All**, **Americas**, **Asia-Pacific**, **EMEA**) or click a specific region name.</p>

    <Tip>
      Some resources may only be available in specific regions.
    </Tip>

    <p>3. Find the quota to increase. Click a group header to expand it. Use the **Search for resources** field to filter by name across all groups. Each quota row shows a friendly name, a short description of what the quota controls, and current usage in the format `used / limit`.</p>

    <Frame>
      <img src="https://mintcdn.com/gcore/u5b7ufmmyXCdvCCK/images/docs/cloud/getting-started/request-a-quota-increase/request-quotas-quota-rows.png?fit=max&auto=format&n=u5b7ufmmyXCdvCCK&q=85&s=69db41cf0aafbf161fa1491c24bdbe11" alt="Compute Service group expanded, showing quota rows with names, descriptions, and usage" width="1024" height="480" data-path="images/docs/cloud/getting-started/request-a-quota-increase/request-quotas-quota-rows.png" />
    </Frame>

    <p>4. Set the new limit using the plus/minus controls or by typing a number directly in the **New limit** field. An orange dot marks each row with a pending change.</p>

    <Info>
      When increasing a quota that depends on another quota, the portal automatically adds the dependent quota to the request. For example, raising the virtual instance count also adds virtual volume quota, since each instance requires at least one volume.
    </Info>

    <Info>
      Multiple service groups and multiple regions can be combined in a single request. Set amounts in one region, then switch to another and repeat.
    </Info>

    <p>5. Review the **Selected resources** block on the right to confirm quantities across all regions.</p>

    <p>6. Add a comment explaining the use case, then click **Send request**.</p>

    <p>A maximum of ten unprocessed requests can be open at a time. Contact support if the limit is reached.</p>
  </MethodSection>

  <MethodSection id="api" label="REST API">
    Each Gcore Cloud region enforces per-account quotas on resource counts — Virtual Machines, Bare Metal servers, load balancers, Kubernetes clusters, and others. The API supports checking current usage and submitting increase requests programmatically.

    <Info>
      An [API token](/developer-tools/rest-api/authentication) is required. To find numeric region IDs, use [list regions](/api-reference/cloud/regions/list-regions).
    </Info>

    Set these as environment variables before running the examples:

    ```bash theme={null}
    export GCORE_API_KEY="{YOUR_API_KEY}"
    export REGION_ID="{YOUR_REGION_ID}"
    ```

    ## Check quota

    The quotas endpoint requires both the region ID and the account client ID. The response includes usage and limit fields for every resource type.

    Retrieve the client ID first:

    ```bash theme={null}
    curl -s https://api.gcore.com/iam/clients/me \
      -H "Authorization: APIKey $GCORE_API_KEY" \
      | python3 -c "import sys,json; d=json.load(sys.stdin); print(d['id'])"
    ```

    Then fetch the quotas:

    <Tabs>
      <Tab title="Python SDK">
        ```python theme={null}
        import os
        from gcore import Gcore

        client = Gcore(api_key=os.environ["GCORE_API_KEY"])

        me = client.iam.get_account_overview()
        quotas = client.cloud.quotas.get_by_region(
            client_id=me.id,
            region_id=int(os.environ["REGION_ID"]),
        )

        print(f"VMs:       {quotas.shared_vm_count_usage} / {quotas.shared_vm_count_limit}")
        print(f"vCPUs:     {quotas.cpu_count_usage} / {quotas.cpu_count_limit}")
        print(f"RAM (MiB): {quotas.ram_usage} / {quotas.ram_limit}")
        # The response contains usage and limit fields for all available quota types.
        ```
      </Tab>

      <Tab title="Go SDK">
        ```go theme={null}
        package main

        import (
            "context"
            "fmt"
            "os"
            "strconv"

            "github.com/G-Core/gcore-go"
            "github.com/G-Core/gcore-go/cloud"
            "github.com/G-Core/gcore-go/option"
            "github.com/G-Core/gcore-go/packages/param"
        )

        func main() {
            client := gcore.NewClient(option.WithAPIKey(os.Getenv("GCORE_API_KEY")))
            ctx := context.Background()

            regionID, _ := strconv.ParseInt(os.Getenv("REGION_ID"), 10, 64)

            me, err := client.Iam.GetAccountOverview(ctx)
            if err != nil {
                fmt.Fprintf(os.Stderr, "get account overview: %v\n", err)
                os.Exit(1)
            }

            quotas, err := client.Cloud.Quotas.GetByRegion(ctx, cloud.QuotaGetByRegionParams{
                ClientID: me.ID,
                RegionID: param.NewOpt(regionID),
            })
            if err != nil {
                fmt.Fprintf(os.Stderr, "get quotas: %v\n", err)
                os.Exit(1)
            }

            fmt.Printf("VMs:       %d / %d\n", quotas.SharedVmCountUsage, quotas.SharedVmCountLimit)
            fmt.Printf("vCPUs:     %d / %d\n", quotas.CPUCountUsage, quotas.CPUCountLimit)
            fmt.Printf("RAM (MiB): %d / %d\n", quotas.RamUsage, quotas.RamLimit)
            // The response contains usage and limit fields for all available quota types.
        }
        ```
      </Tab>

      <Tab title="curl">
        ```bash theme={null}
        # Replace {CLIENT_ID} with the value returned by /iam/clients/me
        curl -s "https://api.gcore.com/cloud/v2/regional_quotas/{CLIENT_ID}/$REGION_ID" \
          -H "Authorization: APIKey $GCORE_API_KEY" \
          | python3 -m json.tool
        ```

        Response:

        ```json theme={null}
        {
          "shared_vm_count_limit": 20,
          "shared_vm_count_usage": 3,
          "cpu_count_limit": 80,
          "cpu_count_usage": 12,
          "ram_limit": 163840,
          "ram_usage": 24576,
          "baremetal_hf_count_limit": 4,
          "baremetal_hf_count_usage": 0,
          "loadbalancer_count_limit": 5,
          "loadbalancer_count_usage": 1,
          "cluster_count_limit": 3,
          "cluster_count_usage": 0,
          ...
        }
        ```
      </Tab>
    </Tabs>

    Each field follows the pattern `{resource}_limit` and `{resource}_usage`. If usage equals the limit, no new resources of that type can be created until the quota is increased.

    ## Request a quota increase

    Submit an increase request specifying the resource fields to increase and the target values in `regional_limits`.

    <Tabs>
      <Tab title="Python SDK">
        ```python theme={null}
        import os
        from gcore import Gcore

        client = Gcore(api_key=os.environ["GCORE_API_KEY"])

        client.cloud.quotas.requests.create(
            description="Scaling up application cluster in Luxembourg-3",
            requested_limits={
                "regional_limits": [
                    {
                        "region_id": int(os.environ["REGION_ID"]),
                        "baremetal_hf_count_limit": 10,
                        "shared_vm_count_limit": 50,
                    }
                ]
            },
        )
        print("Quota request submitted.")
        ```
      </Tab>

      <Tab title="Go SDK">
        ```go theme={null}
        package main

        import (
            "context"
            "fmt"
            "os"
            "strconv"

            "github.com/G-Core/gcore-go"
            "github.com/G-Core/gcore-go/cloud"
            "github.com/G-Core/gcore-go/option"
            "github.com/G-Core/gcore-go/packages/param"
        )

        func main() {
            client := gcore.NewClient(option.WithAPIKey(os.Getenv("GCORE_API_KEY")))
            ctx := context.Background()

            regionID, _ := strconv.ParseInt(os.Getenv("REGION_ID"), 10, 64)

            err := client.Cloud.Quotas.Requests.New(ctx, cloud.QuotaRequestNewParams{
                Description: "Scaling up application cluster in Luxembourg-3",
                RequestedLimits: cloud.QuotaRequestNewParamsRequestedLimits{
                    RegionalLimits: []cloud.QuotaRequestNewParamsRequestedLimitsRegionalLimit{
                        {
                            RegionID:              param.NewOpt(regionID),
                            BaremetalHfCountLimit: param.NewOpt(int64(10)),
                            SharedVmCountLimit:    param.NewOpt(int64(50)),
                        },
                    },
                },
            })
            if err != nil {
                fmt.Fprintf(os.Stderr, "submit quota request: %v\n", err)
                os.Exit(1)
            }
            fmt.Println("Quota request submitted.")
        }
        ```
      </Tab>

      <Tab title="curl">
        ```bash theme={null}
        curl -s -X POST "https://api.gcore.com/cloud/v2/limits_request" \
          -H "Authorization: APIKey $GCORE_API_KEY" \
          -H "Content-Type: application/json" \
          -d '{
            "description": "Scaling up application cluster in Luxembourg-3",
            "requested_limits": {
              "regional_limits": [
                {
                  "region_id": '"$REGION_ID"',
                  "baremetal_hf_count_limit": 10,
                  "shared_vm_count_limit": 50
                }
              ]
            }
          }'
        ```
      </Tab>
    </Tabs>
  </MethodSection>
</MethodSwitch>
