# Method: services.disable

- [HTTP request](https://docs.cloud.google.com/service-infrastructure/docs/service-management/reference/rest/v1/services/disable#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/service-infrastructure/docs/service-management/reference/rest/v1/services/disable#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/service-infrastructure/docs/service-management/reference/rest/v1/services/disable#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/service-infrastructure/docs/service-management/reference/rest/v1/services/disable#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/service-infrastructure/docs/service-management/reference/rest/v1/services/disable#body.response_body)
- [Authorization Scopes](https://docs.cloud.google.com/service-infrastructure/docs/service-management/reference/rest/v1/services/disable#body.aspect)

> [!WARNING]
> Enable and Disable methods in Service Management are deprecated in favor of the [Service Usage methods](https://cloud.google.com/service-usage/docs/reference/rest/v1/services/disable).

Disables a `https://docs.cloud.google.com/service-infrastructure/docs/service-management/reference/rest/v1/services#ManagedService` for a project, so it can no longer be be used for the project. It prevents accidental usage that may cause unexpected billing charges or security leaks.

Operation\<response: DisableServiceResponse\>

### HTTP request

`POST https://servicemanagement.googleapis.com/v1/services/{serviceName}:disable`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `serviceName` | `string` Required. name of the service to disable. Specifying an unknown service name will cause the request to fail. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `serviceName`: - `servicemanagement.services.bind` |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "consumerId": string } ``` |

| Fields ||
|---|---|
| `consumerId` | `string` Required. The identity of consumer resource which service disablement will be applied to. The Google Service Management implementation accepts the following forms: - "project:" Note: this is made compatible with google.api.servicecontrol.v1.Operation.consumer_id. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `consumerId`: - `servicemanagement.services.bind` |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/service-infrastructure/docs/service-management/reference/rest/v1/operations#Operation`.

### Authorization Scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/service.management`
- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://cloud.google.com/docs/authentication/).