提供意見
使用 IAM 控管存取權
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
本頁說明如何使用身分與存取權管理 (IAM) 角色和權限,控管 Google Cloud 資源中的錯誤回報資料存取權。
總覽
IAM 權限 和角色 可決定您是否能透過 Error Reporting API 和Google Cloud 主控台存取資料。
如要在 Google Cloud 資源 (例如 Google Cloud 專案、資料夾或機構) 中使用錯誤回報功能,您必須獲得該資源的 IAM 角色。這個角色必須包含適當的權限。
角色是一組權限。您無法直接授予主體權限,而是授予角色。將角色授予主體後,就會授予該角色具備的所有權限。您可以為相同的主體授予多個角色。
預先定義的角色
IAM 提供預先定義的角色,可針對特定 Google Cloud 資源提供精細的存取權。 Google Cloud 會建立及維護這些角色,並視需要自動更新權限,例如當「錯誤回報」新增新功能時。
下表列出錯誤回報角色、角色名稱、說明、包含的權限,以及可設定角色的最低層級資源類型。您可以為此資源類型授予特定角色,在大多數情況下,也可以為Google Cloud 階層 中位於該類型之上的任何類型授予角色。
如要取得角色包含的個別權限清單,請參閱「取得角色中繼資料 」一節。
Role
Permissions
Error Reporting Admin
Beta
(roles/errorreporting.admin
)
Provides full access to Error Reporting data.
Lowest-level resources where you can grant this role:
cloudnotifications.activities.list
errorreporting.*
errorreporting.applications.list
errorreporting.errorEvents.create
errorreporting.errorEvents.delete
errorreporting.errorEvents.list
errorreporting.groupMetadata.get
errorreporting.groupMetadata.update
errorreporting.groups.list
logging.notificationRules.*
logging.notificationRules.create
logging.notificationRules.delete
logging.notificationRules.get
logging.notificationRules.list
logging.notificationRules.update
resourcemanager.projects.get
resourcemanager.projects.list
stackdriver.projects.get
Error Reporting User
Beta
(roles/errorreporting.user
)
Provides the permissions to read and write Error Reporting data, except
for sending new error events.
Lowest-level resources where you can grant this role:
cloudnotifications.activities.list
errorreporting.applications.list
errorreporting.errorEvents.delete
errorreporting.errorEvents.list
errorreporting.groupMetadata.*
errorreporting.groupMetadata.get
errorreporting.groupMetadata.update
errorreporting.groups.list
logging.notificationRules.*
logging.notificationRules.create
logging.notificationRules.delete
logging.notificationRules.get
logging.notificationRules.list
logging.notificationRules.update
resourcemanager.projects.get
resourcemanager.projects.list
stackdriver.projects.get
Error Reporting Viewer
Beta
(roles/errorreporting.viewer
)
Provides read-only access to Error Reporting data.
Lowest-level resources where you can grant this role:
cloudnotifications.activities.list
errorreporting.applications.list
errorreporting.errorEvents.list
errorreporting.groupMetadata.get
errorreporting.groups.list
logging.notificationRules.get
logging.notificationRules.list
resourcemanager.projects.get
resourcemanager.projects.list
stackdriver.projects.get
Error Reporting Writer
Beta
(roles/errorreporting.writer
)
Provides the permissions to send error events to Error Reporting.
Lowest-level resources where you can grant this role:
errorreporting.errorEvents.create
API 權限
Error Reporting API 方法需要特定的 IAM 權限。下表列出 API 方法所需的權限,並加以說明。
方法
所需權限
說明
deleteEvents
errorreporting.errorEvents.delete
刪除錯誤事件。
events.list
errorreporting.errorEvents.list
列出錯誤事件。
events.report
errorreporting.errorEvents.create
建立或更新錯誤事件。
groupStats.list
errorreporting.groups.list
清單 ErrorGroupStats
。
groups.get
errorreporting.groupMetadata.get
擷取錯誤群組資訊。
groups.update
errorreporting.groupMetadata.update
errorreporting.applications.list
更新錯誤群組資訊並將其設為靜音。 變更錯誤解決狀態。 專案的服務和版本清單。
其他考量
決定要為主體的用途套用哪些權限和角色 時,請參考下列摘要,瞭解錯誤回報活動和必要權限:
活動
所需權限
具備 Error Reporting Google Cloud 控制台頁面的唯讀存取權。
errorreporting.applications.list
errorreporting.groupMetadata.get
errorreporting.groups.list
在 Google Cloud 控制台中查看群組詳細資料。
唯讀權限加上:errorreporting.errorEvents.list
在 Google Cloud 控制台中變更中繼資料。變更錯誤解決狀態,包括略過錯誤。
唯讀權限加上:errorreporting.groupMetadata.update
在 Google Cloud 控制台中刪除錯誤。
唯讀權限加上:errorreporting.errorEvents.delete
建立錯誤 (不需要 Google Cloud 控制台權限)。
errorreporting.errorEvents.create
訂閱通知。
唯讀權限加上:cloudnotifications.activities.list
授予及管理角色
您可以使用Google Cloud 主控台、IAM API 方法或 Google Cloud CLI 來授予及管理 IAM 角色。如需授予及管理角色的操作說明,請參閱「授予、變更及撤銷存取權 」。
您可以將多個角色授予同一使用者。如要取得角色包含權限的清單,請參閱「取得角色中繼資料 」一節。
如果您嘗試存取 Google Cloud 資源,但缺少必要的權限,請與該資源的擁有者 聯絡。
自訂角色
如要建立具有「錯誤回報」權限的自訂角色,請從「API 權限」 中選擇權限,然後按照建立自訂角色 的操作說明操作。
角色變更延遲
錯誤回報快取 IAM 權限的時間是 5 分鐘,因此,角色變更約需 5 分鐘才會生效。
提供意見
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權 ,程式碼範例則為阿帕契 2.0 授權 。詳情請參閱《Google Developers 網站政策 》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-06-12 (世界標準時間)。
想進一步說明嗎?
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-06-12 (世界標準時間)。"],[[["IAM roles and permissions are used to control access to Error Reporting data in Google Cloud resources via the Error Reporting API and the Google Cloud console."],["Predefined roles such as Error Reporting Admin, User, Viewer, and Writer provide varying levels of access to Error Reporting data, with specific permissions granted for each role."],["Different Error Reporting API methods require specific IAM permissions, such as `errorreporting.errorEvents.delete` for deleting error events or `errorreporting.errorEvents.create` for creating error events."],["Activities within Error Reporting, such as read-only access, changing metadata, or deleting errors, require a specific set of permissions, which are detailed in the provided content."],["Role change latency in error reporting will take up to 5 minutes to become effective."]]],[]]