Enabling and Disabling APIs

Enabling an API associates it with the current project, adds monitoring pages, and enables billing for that API if billing is enabled for the project.

Enable an API

The simplest way to enable an API for your project is to use the GCP Console, though you can also enable an API using gcloud or using the Service Usage API. You can find out more about these options in the Service Usage API docs.

To enable an API for your project using the console:

  1. Go to the GCP Console API Library.
  2. From the projects list, select a project or create a new one.
  3. In the API Library, select the API you want to enable. If you need help finding the API, use the search field and/or the filters.
  4. On the API page, click ENABLE.

Disable an API

You can disable an API for a project at any time, although any pending fees will still be charged to your account and you'll be charged for any billable API use in your projects. For more information, see APIs and billing.

As with enabling APIs, the simplest way to disable an API for your project is to use the GCP Console, though you can also disable an API using gcloud or using the Service Usage API. You can find out more about these options in the Service Usage API docs.

To disable an API for your project using the console:

  1. Go to the GCP Console APIs & Services Dashboard page.
  2. From the projects list, select a project.
  3. From the list of APIs, locate the API you want to disable. In the API's row, to the right of the API statistics, click Disable.
    • Alternatively, from the list of APIs, click the name of the API you want to disable, then click stop DISABLE API.

APIs and billing

Some Google APIs charge for usage, and you need to enable billing before you can start using these APIs. Enabling billing for the APIs that your projects use also has other advantages:

  • Some APIs allow free usage up to a courtesy usage limit, and in some cases this free limit is increased when you enable billing.
  • For some APIs, more services are available after you enable billing. For example, when you enable billing for the Google Cloud Platform BigQuery APIs, you can create your own tables; if you do not enable billing, you're limited to existing datasets.

Billing concepts

  • Billing is enabled at the project level, not the API level.
  • If you enable billing for a project, then every billable API in that project is billed, based on the project's usage.
  • All usage in a project is billed using the payment method that you specify, and you can change to a different method at any time.
  • You cannot selectively enable billing for some APIs but not others; when you enable billing for a project, it applies to all the APIs that you used within that project, even if the API is currently disabled.
  • You are billed only for usage of billable APIs.
  • After you enable billing, any requests to billable APIs beyond their free courtesy usage limits are billed, subject to the billing terms of each API.
  • For complete billing and usage rules for Google Cloud Platform, see Google Cloud Platform Pricing Details. For other Google API billing details, refer to the documentation for that API.

More information

For more information about billing, see Create, modify, or close your billing account.

For information about enabling billing on your project, see Modify a project's billing settings.

Cette page vous a-t-elle été utile ? Évaluez-la :

Envoyer des commentaires concernant…