This page explains how to enable or disable Dataproc Metastore
for your Google Cloud project. For more information about the Service Usage API,
see [Enabling and disabling services](https://docs.cloud.google.com/service-usage/docs/enable-disable).

## Before you begin

- [Understand how Dataproc Metastore works](https://docs.cloud.google.com/dataproc-metastore/docs/overview).

### Required Roles


To get the permissions that
you need to enable and disable the Dataproc Metastore API,

ask your administrator to grant you the
[Service Usage Administrator](https://docs.cloud.google.com/iam/docs/roles-permissions/serviceusage#serviceusage.serviceUsageAdmin) (`roles/serviceusage.serviceUsageAdmin`) IAM role on your project.


For more information about granting roles, see [Manage access to projects, folders, and organizations](https://docs.cloud.google.com/iam/docs/granting-changing-revoking-access).


This predefined role contains

the permissions required to enable and disable the Dataproc Metastore API. To see the exact permissions that are
required, expand the **Required permissions** section:


#### Required permissions

The following permissions are required to enable and disable the Dataproc Metastore API:

- `serviceusage.services.disable`
- `serviceusage.services.enable`


You might also be able to get
these permissions
with [custom roles](https://docs.cloud.google.com/iam/docs/creating-custom-roles) or
other [predefined roles](https://docs.cloud.google.com/iam/docs/roles-overview#predefined).
For more information about specific Dataproc Metastore roles and permissions, see [Dataproc Metastore IAM overview](https://docs.cloud.google.com/dataproc-metastore/docs/iam-and-access-control).

<br />

## Enable Dataproc Metastore

You can use an existing Google Cloud project with Dataproc Metastore
or create a new one. In both cases, you need to enable billing and the
Dataproc Metastore API.

<br />

## Disable Dataproc Metastore

Before you disable the Dataproc Metastore API, make sure you
[Delete all of your metastore services](https://docs.cloud.google.com/dataproc-metastore/docs/delete-service).
You can't disable the API while a service is running or still exists.

> [!NOTE]
> **Note:** To avoid charges, delete all Cloud Storage buckets for your services. You can delete your services before or after disabling the API.

To disable the Dataproc Metastore API, follow these steps:

1. In the Google Cloud console, select the project that contains the Dataproc Metastore API.
2. Go to the Dataproc Metastore [API overview page](https://console.cloud.google.com/apis/library/metastore.googleapis.com).
3. Click **Manage**.
4. Click **Disable API**.

## What's next

- [Quickstart for deploying Dataproc Metastore](https://docs.cloud.google.com/dataproc-metastore/docs/create-service-cluster)
- [Create a service](https://docs.cloud.google.com/dataproc-metastore/docs/create-service)
- [Service access](https://docs.cloud.google.com/dataproc-metastore/docs/access-service)