本頁面提供有關 BigQuery 的 Cloud Identity and Access Management 角色和權限資訊。
本頁面將說明與以下每項 BigQuery 隨附產品有關的角色和權限:
- BigQuery ML
- BigQuery 資料移轉服務
- BigQuery BI Engine
如需 BigQuery ML 中的存取權控管相關資訊,請參閱 BigQuery ML 說明文件中的存取權控管。
總覽
如果有某身分識別呼叫 Google Cloud Platform API,BigQuery 會要求該身分識別具備使用相關資源的適當權限。您可以將角色授予使用者、群組或服務帳戶,藉此授予權限。
本頁面說明您可為身分識別授予哪些能存取 BigQuery 資源的 BigQuery Cloud IAM 角色。
Cloud IAM 角色類型
Cloud Identity and Access Management 中有三種類型的角色:
- 原始角色:在 Cloud Identity and Access Management 推出前就存在的角色,包括「擁有者」、「編輯者」和「檢視者」角色。
- 預先定義角色:針對特定服務提供精細的存取權,並由 GCP 代管。預先定義的角色可因應常見的用途和存取權控管模式。
- 自訂角色:根據使用者指定的權限清單,提供精細的存取權限。
如要判斷是否有一或多個權限包含在原始、預先定義或自訂角色中,可以透過以下方式進行:
當您同時指派預先定義和原始角色給使用者時,授予的權限是每個角色的權限聯集。
如要進一步瞭解如何使用 Cloud IAM 存取資源,請參閱 Cloud Identity and Access Management 說明文件中的授予、變更及撤銷資源的存取權。
如要進一步瞭解如何建立自訂角色,請參閱 Cloud Identity and Access Management 說明文件中的建立及管理自訂角色。
BigQuery 權限和預先定義的 Cloud IAM 角色
如要授予 BigQuery 資源的存取權,請將一或多個角色指派給使用者、群組或服務帳戶。如果在機構組織和專案層級指派角色,您將授予能執行 BigQuery 工作或管理「全部」專案中 BigQuery 資源的權限。
您也可以在資料集層級指派角色,只授予存取一或多個資料集的權限。在 Cloud IAM 政策階層中,BigQuery 資料集是專案的子資源。資料表和檢視表是資料集的子項資源,會沿用父項資料集的權限。
如要進一步瞭解如何在資料集層級指派角色,請參閱控管資料集存取權。
BigQuery 權限
下表說明 BigQuery 中的可用權限。
權限 |
說明 |
bigquery.jobs.create |
建立新工作。 |
bigquery.jobs.listAll |
列出所有工作,並擷取任何使用者所提交之任何工作的中繼資料。* |
bigquery.jobs.list |
列出所有工作,並擷取任何使用者所提交之任何工作的中繼資料。* 對於其他使用者提交的工作,則會遮蓋詳細資料和中繼資料。 |
bigquery.jobs.get |
取得任何工作的資料和中繼資料。* |
bigquery.jobs.update |
取消任何工作。* |
bigquery.datasets.create |
建立新的空資料集。 |
bigquery.datasets.delete |
刪除資料集。 |
bigquery.datasets.get |
取得有關資料集的中繼資料。 |
bigquery.datasets.update |
更新資料集的中繼資料。 |
bigquery.tables.create |
建立新表格。 |
bigquery.tables.list |
列出表格及表格的中繼資料。 |
bigquery.tables.delete |
刪除表格 |
bigquery.tables.get |
取得資料表中繼資料。 如要取得資料表資料,您需要 bigquery.tables.getData 。 |
bigquery.tables.getData |
取得表格資料。您必須具備這項權限才能查詢資料表資料。
如要取得資料表中繼資料,您需要 bigquery.tables.get 。 |
bigquery.tables.export |
從 BigQuery 匯出資料表資料。 |
bigquery.tables.update |
更新資料表中繼資料。 如要更新資料表資料,您需要 bigquery.tables.updateData 。 |
bigquery.tables.updateData |
更新資料表資料。 如要更新資料表中繼資料,您需要 bigquery.tables.update 。 |
bigquery.routines.create (Beta 版) |
建立新處理常式 (函式和預存程序)。 |
bigquery.routines.list (Beta 版) |
列出處理常式和處理常式上的中繼資料。 |
bigquery.routines.delete (Beta 版) |
刪除處理常式。 |
bigquery.routines.get (Beta 版) |
取得處理常式定義和中繼資料。 |
bigquery.routines.update (Beta 版) |
更新處理常式定義和中繼資料。 |
bigquery.transfers.get |
取得轉移中繼資料。 |
bigquery.transfers.update |
建立、更新及刪除轉移。 |
bigquery.savedqueries.create |
建立儲存的查詢。 |
bigquery.savedqueries.get |
取得儲存查詢的中繼資料。 |
bigquery.savedqueries.list |
列出儲存的查詢。 |
bigquery.savedqueries.update |
更新儲存的查詢。 |
bigquery.savedqueries.delete |
刪除儲存的查詢。 |
bigquery.readsessions.create (Beta 版) |
透過 BigQuery Storage API 建立新的讀取工作階段。 |
bigquery.connections.create (Beta 版) |
在專案中建立新的連線。 |
bigquery.connections.get (Beta 版) |
取得連線中繼資料。不包含憑證。 |
bigquery.connections.list (Beta 版) |
列出專案中的連線。 |
bigquery.connections.use (Beta 版) |
使用連線設定連線至遠端資料來源。 |
bigquery.connections.update (Beta 版) |
更新連線及其憑證。 |
bigquery.connections.delete (Beta 版) |
刪除連線。 |
* 對於您建立的任何工作,您會自動取得該工作中 bigquery.jobs.get
和 bigquery.jobs.update
權限的相等權限。
BigQuery 預先定義的 Cloud IAM 角色
下表列出 BigQuery 預先定義的 Cloud IAM 角色,以及各角色具備的所有權限對應清單。請注意,每個權限只適用於特定資源類型。
BigQuery 角色
角色 |
名稱 |
說明 |
權限 |
最低資源 |
roles/ bigquery.admin |
BigQuery Admin
|
Provides permissions to manage all resources within the project. Can manage
all data within the project, and can cancel jobs from other users running
within the project.
|
bigquery.*
resourcemanager.projects.get
resourcemanager.projects.list
|
Project
|
roles/ bigquery.connectionAdmin |
BigQuery Connection Admin
Beta
|
|
bigquery.connections.*
|
|
roles/ bigquery.connectionUser |
BigQuery Connection User
Beta
|
|
bigquery.connections.get
bigquery.connections.getIamPolicy
bigquery.connections.list
bigquery.connections.use
|
|
roles/ bigquery.dataEditor |
BigQuery Data Editor
|
When applied to a dataset, dataEditor provides permissions to:
- Read the dataset's metadata and to list tables in the dataset.
- Create, update, get, and delete the dataset's tables.
When applied at the project or organization level, this role can also
create new datasets.
|
bigquery.datasets.create
bigquery.datasets.get
bigquery.datasets.getIamPolicy
bigquery.datasets.updateTag
bigquery.models.*
bigquery.routines.*
bigquery.tables.create
bigquery.tables.delete
bigquery.tables.export
bigquery.tables.get
bigquery.tables.getData
bigquery.tables.list
bigquery.tables.update
bigquery.tables.updateData
bigquery.tables.updateTag
resourcemanager.projects.get
resourcemanager.projects.list
|
Dataset
|
roles/ bigquery.dataOwner |
BigQuery Data Owner
|
When applied to a dataset, dataOwner provides permissions to:
- Read, update, and delete the dataset.
- Create, update, get, and delete the dataset's tables.
When applied at the project or organization level, this role can also
create new datasets.
|
bigquery.datasets.*
bigquery.models.*
bigquery.routines.*
bigquery.tables.*
resourcemanager.projects.get
resourcemanager.projects.list
|
Dataset
|
roles/ bigquery.dataViewer |
BigQuery Data Viewer
|
When applied to a dataset, dataViewer provides permissions to:
- Read the dataset's metadata and to list tables in the dataset.
- Read data and metadata from the dataset's tables.
When applied at the project or organization level, this role can also
enumerate all datasets in the project. Additional roles, however, are
necessary to allow the running of jobs.
|
bigquery.datasets.get
bigquery.datasets.getIamPolicy
bigquery.models.getData
bigquery.models.getMetadata
bigquery.models.list
bigquery.routines.get
bigquery.routines.list
bigquery.tables.export
bigquery.tables.get
bigquery.tables.getData
bigquery.tables.list
resourcemanager.projects.get
resourcemanager.projects.list
|
Dataset
|
roles/ bigquery.jobUser |
BigQuery Job User
|
Provides permissions to run jobs, including queries, within the project.
This role can check the existence of all jobs, enumerate their own jobs,
and cancel their own jobs.
|
bigquery.jobs.create
resourcemanager.projects.get
resourcemanager.projects.list
|
Project
|
roles/ bigquery.metadataViewer |
BigQuery Metadata Viewer
|
When applied at the project or organization level, metadataViewer
provides permissions to:
- List all datasets and read metadata for all datasets in the project.
- List all tables and views and read metadata for all tables and views
in the project.
Additional roles are necessary to allow the running of jobs.
|
bigquery.datasets.get
bigquery.datasets.getIamPolicy
bigquery.models.getMetadata
bigquery.models.list
bigquery.routines.get
bigquery.routines.list
bigquery.tables.get
bigquery.tables.list
resourcemanager.projects.get
resourcemanager.projects.list
|
Project
|
roles/ bigquery.readSessionUser |
BigQuery Read Session User
Beta
|
Access to create and use read sessions
|
bigquery.readsessions.*
resourcemanager.projects.get
resourcemanager.projects.list
|
|
roles/ bigquery.user |
BigQuery User
|
Provides permissions to run jobs, including queries, within the project. The
user role can enumerate their own jobs, cancel their own jobs, and enumerate
datasets within a project. Additionally, allows the creation of new datasets
within the project; the creator is granted the
bigquery.dataOwner role for these new datasets.
|
bigquery.config.get
bigquery.datasets.create
bigquery.datasets.get
bigquery.datasets.getIamPolicy
bigquery.jobs.create
bigquery.jobs.list
bigquery.models.list
bigquery.readsessions.*
bigquery.routines.list
bigquery.savedqueries.get
bigquery.savedqueries.list
bigquery.tables.list
bigquery.transfers.get
resourcemanager.projects.get
resourcemanager.projects.list
|
Project
|
BigQuery 原始角色
如要瞭解 BigQuery 原始角色,請參閱 BigQuery 原始角色和權限。
BigQuery 自訂角色
如要為 BigQuery 建立自訂 Cloud IAM 角色,請按照 Cloud IAM 自訂角色說明文件中的步驟操作。
後續步驟