Disable a service so that it can no longer be used with a project. This prevents unintended usage that may cause unexpected billing charges or security leaks.
It is not valid to call the disable method on a service that is not currently enabled. Callers will receive a FAILED_PRECONDITION status if the target service is not currently enabled.
HTTP request
POST https://serviceusage.googleapis.com/v1/{name=*/*/services/*}:disable
Indicates if services that are enabled and which depend on this service should also be disabled. If not set, an error will be generated if any enabled services depend on the service to be disabled. When set, the service, and any enabled services that depend on it, will be disabled together.
Enum to determine if service usage should be checked when disabling a service.
Enums
CHECK_IF_SERVICE_HAS_USAGE_UNSPECIFIED
When unset, the default behavior is used, which is SKIP.
SKIP
If set, skip checking service usage when disabling a service.
CHECK
If set, service usage is checked when disabling the service. If a service, or its dependents, has usage in the last 30 days, the request returns a FAILED_PRECONDITION error.
[[["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-05-14 UTC."],[],[],null,["# Method: services.disable\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [CheckIfServiceHasUsage](#CheckIfServiceHasUsage)\n\nDisable a service so that it can no longer be used with a project. This prevents unintended usage that may cause unexpected billing charges or security leaks.\n\nIt is not valid to call the disable method on a service that is not currently enabled. Callers will receive a `FAILED_PRECONDITION` status if the target service is not currently enabled.\n\n### HTTP request\n\n`POST https://serviceusage.googleapis.com/v1/{name=*/*/services/*}:disable`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body contains data with the following structure:\n\n### Response body\n\nIf successful, the response body contains an instance of [Operation](/service-usage/docs/reference/rest/Shared.Types/ListOperationsResponse#Operation).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/service.management`\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](https://cloud.google.com/docs/authentication/).\n\nCheckIfServiceHasUsage\n----------------------\n\nEnum to determine if service usage should be checked when disabling a service."]]