本頁說明如何為 Google Cloud 專案啟用或停用 Dataproc Metastore。如要進一步瞭解 Service Usage API,請參閱「啟用及停用服務」。
事前準備
必要的角色
如要取得啟用及停用 Dataproc metastore API 的權限,請要求管理員授予您專案的「服務使用情形管理員 」(roles/serviceusage.serviceUsageAdmin) IAM 角色。如要進一步瞭解如何授予角色,請參閱「管理專案、資料夾和組織的存取權」。
這個預先定義的角色具備啟用及停用 Dataproc Metastore API 所需的權限。如要查看確切的必要權限,請展開「Required permissions」(必要權限) 部分:
所需權限
如要啟用及停用 Dataproc Metastore API,您必須具備下列權限:
-
serviceusage.services.disable -
serviceusage.services.enable
啟用 Dataproc Metastore
您可以搭配現有 Google Cloud 專案使用 Dataproc Metastore,或是建立新的專案。無論是哪種情況,您都需要啟用帳單功能和 Dataproc Metastore API。
- 登入 Google Cloud 帳戶。如果您是 Google Cloud新手,歡迎 建立帳戶,親自評估產品在實際工作環境中的成效。新客戶還能獲得價值 $300 美元的免費抵免額,可用於執行、測試及部署工作負載。
-
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 role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. 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.enablepermission. 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 role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. 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.enablepermission. Learn how to grant roles.
停用 Dataproc Metastore
停用 Dataproc Metastore API 前,請務必刪除所有 Metastore 服務。如果服務仍在執行或存在,您就無法停用 API。
如要停用 Dataproc Metastore API,請按照下列步驟操作:
- 在 Google Cloud 控制台選取包含 Dataproc Metastore API 的專案。
- 前往 Dataproc Metastore API 總覽頁面。
- 點選「管理」。
- 按一下 [Disable API] (停用 API)。