A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cloud.google.com/service-usage/docs/enable-disable below:

Enabling and Disabling Services | Service Usage Documentation

Stay organized with collections Save and categorize content based on your preferences.

Enabling and Disabling Services

This page describes how to enable and disable services for a Google Cloud project. You can use Service Usage to enable or disable any available service for your projects, including public Google Cloud services and private services created using Cloud Endpoints. For more information on the differences between public and private APIs and services, see Public and Private Services.

For most operational use cases, the simplest way to enable and disable services is to use the Google Cloud console. If you need to create scripts, you can also use the Google Cloud CLI. If you need to program against the Service Usage API, we recommend that you use one of our provided client libraries. To experiment with the API, you can follow the alternative instructions in this guide and use the curl command to test the API without setting up a full application development environment.

Before you begin

To enable and disable APIs and services you need:

Enabling services

Enabling services uses quota from the serviceusage.googleapis.com/mutate_requests quota metric. The default available quota is 2 queries per second (QPS).

console

To enable an API for a project:

  1. Go to the Google Cloud console API Library page.
    Go to the API Library page
  2. Select the Google Cloud project where you want to enable an API by performing one of the following:

  3. Click the API you want to enable. If you need help finding the API, use the Search for APIs & Services box near the top of the page. A page describing the API appears.

  4. Click the Enable button.

gcloud

Run the following command to enable the Pub/Sub API service in your current project:

gcloud services enable pubsub.googleapis.com

The command produces output similar to the following:

Waiting for async operation operations/acf.2e2fcfce-8327-4984-9040-a67777082687 to complete...
Operation finished successfully.

You can use the following command to get the operation details:

gcloud services operations describe operations/acf.2e2fcfce-8327-4984-9040-a67777082687
curl

You can enable a single service using the services.enable method. You can enable between 2 and 20 services in a single operation using the services.batchEnable method.

Enable a single service

The following command enables the Pub/Sub API service on your project:

gcurl -d '{}' "https://serviceusage.googleapis.com/v1/projects/${PROJECT_NUMBER}/services/pubsub.googleapis.com:enable"

The services.enable method returns a Long Running Operation resource, which represents ongoing work on the server. Each operation has a unique resource name. For example, here is an operation with the name operations/acf.2e2fcfce-8327-4984-9040-a67777082687:

{
  "name": "operations/acf.2e2fcfce-8327-4984-9040-a67777082687"
}

To poll the operation status by using the Service Usage operations.get method, pass the name of the operation to the API:

OPERATION_NAME="operations/acf.2e2fcfce-8327-4984-9040-a67777082687"
gcurl "https://serviceusage.googleapis.com/v1/${OPERATION_NAME}"
Enable multiple services at once

If you want to enable multiple API services on your project, you can issue an enable command for each API service individually, or you can issue one batch enable command and specify multiple APIs. For example, to enable both the Pub/Sub and Dataflow API services on your project:

gcurl -d '{
"serviceIds": ["pubsub.googleapis.com", "dataflow.googleapis.com"]
}' "https://serviceusage.googleapis.com/v1/projects/${PROJECT_NUMBER}/services:batchEnable"

Like services.enable, services.batchEnable returns an operation resource, which you can poll by using its name.

Note: The process for enabling APIs can vary. Some APIs prompt you to accept their Terms of Service before you can enable them. Some APIs are in preview mode and require special signup and whitelisting before you can use them. Other APIs might ask for additional information, such as your organization's contact information and the name of the application you are developing. When more information is requested, it will not be shared outside of Google; it's used to help Google understand how the API is being used and as a secondary contact should we need to contact you regarding your use of the service. Disabling services

Disabling services uses quota from the serviceusage.googleapis.com/mutate_requests quota metric. The default available quota is 2 queries per second (QPS).

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.

Many services like Cloud Storage and BigQuery charge to store data. Disabling a service's API access does not delete the underlying data which will continue to be billed. If your intent is to discontinue using a service and stop all future charges, be sure to delete all data associated with the service before disabling the service's API access.

If you disable the GKE API, any running clusters in the project become suspended. After 30 days, the suspended clusters are deleted. To reinstate your suspended clusters, enable the GKE API. It may take up to 24 hours for the clusters to be reinstated.

Note: In v1 of the API, if you attempt to disable a service that other enabled services depend on, the call will fail. The API call to disable the service will result in an error message. To disable the specified service and all of the services that depend on it, set the disable_dependent_services parameter on the services.disable request to true. console

To disable an API for a project:

  1. Go to the Google Cloud console API Dashboard page.
    Go to the API Dashboard page
  2. Select the Google Cloud project where you want to disable an API by performing one of the following:

  3. Click the API you want to disable. If you need help finding the API, use the Search for APIs & Services box near the top of the page. A page describing the API appears.

  4. Click stop Disable API.

gcloud

Run the following command to disable the Pub/Sub API service for your current project:

gcloud services disable pubsub.googleapis.com

The command produces output similar to the following:

Waiting for async operation operations/acf.e9d0943b-55d9-4ac0-8af4-745e1b8983f8 to complete...
Operation finished successfully.

You can use the following command to get the operation details:

gcloud services operations describe operations/acf.e9d0943b-55d9-4ac0-8af4-745e1b8983f8
curl

The following command disables the Pub/Sub API service on your project:

gcurl -d '{}' "https://serviceusage.googleapis.com/v1/projects/${PROJECT_NUMBER}/services/pubsub.googleapis.com:disable"

Like services.enable, services.disable returns an operation resource, which you can poll by using its name.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-02 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-02 UTC."],[],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4