Seleziona il progetto Google Cloud a cui vuoi accedere all'API.
Nella pagina Libreria API, abilita l'API Cloud Quotas.
Assicurati che il tuo account utente disponga dei ruoli IAM richiesti.
gcloud
Prima di iniziare
Autenticati in gcloud CLI prima di utilizzarla per attivare le API. Per ulteriori informazioni sulla procedura di autenticazione, consulta
Autorizzare gcloud CLI.
Sostituisci PROJECT_ID con l'ID del progetto
che deve accedere all'API Cloud Quotas. Puoi trovare l'ID progetto nella
pagina Benvenuto della console Google Cloud .
Per verificare che l'API Cloud Quotas sia abilitata nel tuo progetto, esegui il comando
gcloud services list e filtra per cloudquotas.googleapis.com passando l'output a un comando come grep o utilizzando un comando gcloud CLI
filter:
gcloud services list --filter="cloudquotas.googleapis.com"
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema รจ stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-02 UTC."],[[["\u003cp\u003eThis page outlines the steps to set up a development environment for the Cloud Quotas API and configure \u003ccode\u003ecurl\u003c/code\u003e for API testing.\u003c/p\u003e\n"],["\u003cp\u003eEnabling the Cloud Quotas API in a specific Google Cloud project is a prerequisite, which can be done through the Google Cloud console or via the \u003ccode\u003egcloud\u003c/code\u003e command.\u003c/p\u003e\n"],["\u003cp\u003eThe setup process includes defining a shell alias (\u003ccode\u003egcurl\u003c/code\u003e) for streamlined REST API calls and setting the \u003ccode\u003ePROJECT_ID\u003c/code\u003e environment variable.\u003c/p\u003e\n"],["\u003cp\u003eVerifying the setup involves using \u003ccode\u003egcurl\u003c/code\u003e to list enabled APIs and services in your project, ensuring the Cloud Quotas API is included in the results.\u003c/p\u003e\n"]]],[],null,["# Set up the Cloud Quotas API\n\nTo use the Cloud Quotas API, you must first enable it for your\nGoogle Cloud project. This document describes how to enable the Cloud Quotas API.\n\nEnable the API\n--------------\n\nYou can enable the Cloud Quotas API by using the Google Cloud console or the\n[Google Cloud CLI](/sdk/gcloud). \n\n### Console\n\n1. Go to the Google Cloud console **API Library** page.\n\n\n [Go to API Library](https://console.cloud.google.com/project/_/apis/library/cloudquotas.googleapis.com)\n\n \u003cbr /\u003e\n\n2. Select the Google Cloud project that you want to access the API.\n\n3. On the API Library page, enable **Cloud Quotas API**.\n\n4. Make sure that your user account has the required [IAM\n roles](/docs/quotas/permissions).\n\n### gcloud\n\nBefore you begin\n----------------\n\nAuthenticate to the gcloud CLI before you use it to enable\nAPIs. For more information about the authentication process, see\n[Authorize the gcloud CLI](/sdk/docs/authorizing).\n\nEnable the API\n--------------\n\n1. Run the [`gcloud services enable`](/sdk/gcloud/reference/services/enable)\n command and specify the Cloud Quotas API:\n\n gcloud services enable cloudquotas.googleapis.com --project=\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e\n\n Replace \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e with the ID of the project\n that needs access to the Cloud Quotas API. You can find your project ID on the\n [Welcome](https://console.cloud.google.com/welcome) page of the Google Cloud console.\n2. To confirm that the Cloud Quotas API is enabled in your project, run the\n [`gcloud services list`](/sdk/gcloud/reference/services/list) command\n and filter for `cloudquotas.googleapis.com` by passing the output to a\n command such as `grep` or using a gcloud CLI\n [`filter`](/sdk/gcloud/reference/topic/filters):\n\n gcloud services list --filter=\"cloudquotas.googleapis.com\"\n\nWhat's next\n-----------\n\n- About the [Cloud Quotas API](/docs/quotas/api-overview)\n\n- Cloud Quotas API [reference](/docs/quotas/reference/rest)"]]