本頁說明如何為專案啟用或停用 Dataproc Metastore。 Google Cloud 如要進一步瞭解 Service Usage API,請參閱「啟用及停用服務」一文。
事前準備
必要的角色
如要取得啟用及停用 Dataproc Metastore API 所需的權限,請要求管理員授予您專案的服務使用情形管理員 (roles/serviceusage.serviceUsageAdmin
) IAM 角色。如要進一步瞭解如何授予角色,請參閱「管理專案、資料夾和機構的存取權」。
這個預先定義的角色具備啟用及停用 Dataproc Metastore API 所需的權限。如要查看確切的必要權限,請展開「必要權限」部分:
所需權限
如要啟用及停用 Dataproc Metastore API,您必須具備下列權限:
-
serviceusage.services.disable
-
serviceusage.services.enable
啟用 Dataproc Metastore
您可以搭配現有 Google Cloud 專案使用 Dataproc Metastore,或是建立新的專案。無論是哪種情況,您都需要啟用帳單功能和 Dataproc Metastore API。
- Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator
(
roles/resourcemanager.projectCreator
), which contains theresourcemanager.projects.create
permission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
-
Enable the Dataproc Metastore API.
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin
), which contains theserviceusage.services.enable
permission. Learn how to grant roles. -
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator
(
roles/resourcemanager.projectCreator
), which contains theresourcemanager.projects.create
permission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
-
Enable the Dataproc Metastore API.
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin
), which contains theserviceusage.services.enable
permission. Learn how to grant roles. - 在 Google Cloud 控制台選取包含 Dataproc Metastore API 的專案。
- 前往 Dataproc Metastore API 總覽頁面。
- 點選「管理」。
- 按一下 [Disable API] (停用 API)。
停用 Dataproc Metastore
停用 Dataproc Metastore API 前,請務必刪除所有 Metastore 服務。如果服務仍在執行或存在,您就無法停用 API。
如要停用 Dataproc Metastore API,請按照下列步驟操作: