Identity and Access Management (IAM) 包含精細權限,可讓您授予或撤銷個別使用者對特定動作的存取權。為簡化指派權限給使用者的程序,IAM 角色會將這些精細權限合併為相關群組。Billing 具有預先定義的角色,例如帳單帳戶管理員或帳單帳戶檢視者,適用於大多數使用者。但如果不符合需求,您也可以透過自訂角色,授予更具體的權限組合。
建立自訂角色
自訂角色是在組織中建立,然後套用至組織中的任何帳單帳戶。IAM 說明文件中的「建立及管理自訂角色」一文說明如何設定自訂角色,包括所需權限。
建立自訂角色後,您可以將自訂角色授予使用者,就像授予標準、預先定義的角色一樣。瞭解如何更新結算權限。
自訂角色範例
假設您想授予某人編輯費用管理功能的權限,例如預算快訊和帳單匯出。除了存取及查看帳單帳戶所需的基本權限外,預算和匯出的相關權限如下:
billing.budgets.createbilling.budgets.updatebilling.accounts.updateUsageExportSpec
如要使用預先定義的角色套用這些權限,您必須授予帳單帳戶管理員角色。但這個角色同時也具備刪除資源關聯、取消訂閱和關閉帳單帳戶的權限。如果您不希望使用者擁有這些功能,可以建立自訂角色,僅授予三個必要權限,並將其命名為「成本管理管理員」。接著,您可以將該自訂角色與「帳單帳戶檢視者」角色搭配使用,套用至應具備廣泛費用管理權限,但無法編輯其他帳戶屬性的任何使用者。
權限關聯和沿用設定
您可以授予帳單帳戶層級或專案層級的帳單權限。大多數的帳單權限都屬於帳單帳戶,因此包含這類權限的角色必須與帳單帳戶相連結,而屬於專案的其他帳單權限則必須與專案相連結。
舉例來說,如要將專案與帳單帳戶建立關聯,您必須具備帳單帳戶的 billing.resourceAssociations.create 權限,以及專案的 resourcemanager.projects.createBillingAssignment 權限。這是因為專案擁有者可執行的動作需要專案權限,而帳單帳戶管理員可執行的動作則需要帳單帳戶權限。如果兩者都涉及,則必須同時具備這兩項權限。
與其他 IAM 權限一樣,所有帳單權限都會沿用帳單階層中較高層級的權限。舉例來說,如果使用者在組織中具備包含 billing.accounts.close 的角色,就能關閉該組織中的任何帳單帳戶。不過,部分權限只適用於較高的層級。舉例來說,如果將 billing.accounts.list 權限套用至個別帳單帳戶,則不會產生任何作用,但如果使用者在組織中具備包含 billing.accounts.list 的角色,則可列出該組織中的所有帳單帳戶。
帳單活動
下方的表格說明了常見的帳單活動、執行這些活動所需的權限,以及相關權限所適用的資源。
帳戶管理
| 動作 | 權限 | 資源 |
|---|---|---|
| 取得基本帳戶資訊 (例如帳戶名稱、幣別,或帳戶是否已啟用或停用) | billing.accounts.get |
帳單帳戶 |
| 從免費試用版升級 | billing.accounts.update |
帳單帳戶 |
| 重新命名帳戶 | billing.accounts.update |
帳單帳戶 |
| 變更訂購單號碼 | billing.accounts.update |
帳單帳戶 |
| 關閉帳戶 | billing.accounts.close |
帳單帳戶 |
| 重新開啟已關閉的帳戶 | billing.accounts.reopen |
帳單帳戶 |
帳單帳戶階層
| 動作 | 權限 | 資源 |
|---|---|---|
| 列出機構中的帳戶 | billing.accounts.list |
機構 |
| 在機構中建立帳戶 | billing.accounts.create |
機構 |
| 將帳戶移入機構中 | billing.accounts.create |
機構 |
billing.accounts.move |
帳單帳戶 | |
| 在機構之間移動帳戶 | billing.accounts.removeFromOrganization |
舊機構 |
billing.accounts.create |
新機構 | |
billing.accounts.move |
帳單帳戶 |
費用資訊
費用查看權限可以限定於特定專案,也可以在帳單帳戶上授予,以便查看帳單帳戶的所有費用。
| 動作 | 權限 | 資源 |
|---|---|---|
| 查看帳單帳戶的費用和使用情況* | billing.accounts.getSpendingInformation |
帳單帳戶 |
| 查看專案的費用和使用情況* | billing.resourceCosts.get |
專案 |
resourcemanager.projects.get |
專案 |
付款資訊
付款資料包括客戶名稱、地址和付款方式。
| 動作 | 權限 | 資源 |
|---|---|---|
| 查看付款資料 | billing.accounts.getPaymentInfo |
帳單帳戶 |
| 更新付款資料 | billing.accounts.updatePaymentInfo |
帳單帳戶 |
| 只查看有用量的 SKU 價格 | billing.accounts.getPricing |
帳單帳戶 |
| 查看帳單帳戶中各 SKU 的自訂合約價格 | billing.accounts.getPricing |
帳單帳戶 |
| 查看帳單帳戶的費用和用量 | billing.accounts.getSpendingInformation |
帳單帳戶 |
資源關聯
在帳單帳戶之間移動專案所需的權限與以下動作的權限相同:從原始帳單帳戶移除專案,以及將專案連結新的帳單帳戶。
| 動作 | 權限 | 資源 |
|---|---|---|
| 查看專案關聯 | billing.resourceAssociations.list |
帳單帳戶 |
resourcemanager.projects.get |
專案 | |
| 將專案連結帳單帳戶 | billing.resourceAssociations.create |
帳單帳戶 |
serviceusage.services.list |
專案 | |
serviceusage.effectivepolicy.get |
專案 | |
resourcemanager.projects.createBillingAssignment |
專案 | |
| 從帳單帳戶移除專案 | billing.resourceAssociations.delete |
帳單帳戶 |
resourcemanager.projects.deleteBillingAssignment |
專案 |
預算快訊和支出上限
| 動作 | 權限 | 資源 |
|---|---|---|
| 查看 Cloud Billing 帳戶的預算清單 | billing.budgets.get |
帳單帳戶 |
billing.budgets.list |
帳單帳戶 | |
| 更新 Cloud Billing 帳戶範圍內的預算 | billing.budgets.update |
帳單帳戶 |
| 為 Cloud Billing 帳戶建立預算 | billing.budgets.create |
帳單帳戶 |
| 刪除 Cloud Billing 帳戶的預算 | billing.budgets.delete |
帳單帳戶 |
| 設定、編輯及解除 Cloud Billing 帳戶中專案的支出上限預算 | billing.budgets.configureSpendCap |
帳單帳戶 |
| 查看範圍限定為單一專案的預算清單 | resourcemanager.projects.get |
專案 |
billing.resourceCosts.get |
專案 | |
billing.resourcebudgets.read |
專案 | |
| 更新單一專案的預算 | resourcemanager.projects.get |
專案 |
billing.resourceCosts.get |
專案 | |
billing.resourcebudgets.read |
專案 | |
billing.resourcebudgets.write |
專案 | |
| 建立範圍限定為單一專案的預算 | resourcemanager.projects.get |
專案 |
billing.resourceCosts.get |
專案 | |
billing.resourcebudgets.read |
專案 | |
billing.resourcebudgets.write |
專案 | |
| 設定、編輯及取消單一專案的支出上限預算 | resourcemanager.projects.get |
專案 |
billing.resourceCosts.get |
專案 | |
billing.resourcebudgets.read |
專案 | |
billing.resourcebudgets.write |
專案 | |
billing.resourcebudgets.configureSpendCap |
專案 |
抵免額和促銷活動
| 動作 | 權限 | 資源 |
|---|---|---|
| 查看抵免額清單,包括原始和剩餘金額 | billing.credits.list |
帳單帳戶 |
| 兌換促銷代碼 | billing.accounts.redeemPromotion |
帳單帳戶 |
billing.accounts.update |
帳單帳戶 |
政策
政策會定義哪些使用者可以存取帳單帳戶中的哪些資源。如要瞭解如何建立或修改自訂角色,請參閱「建立自訂角色」一節。
| 動作 | 權限 | 資源 |
|---|---|---|
| 查看帳戶的角色,包括相關聯的使用者名稱 | billing.accounts.getIamPolicy |
帳單帳戶 |
| 為帳戶中的使用者授予角色權限 | billing.accounts.setIamPolicy |
帳單帳戶 |
匯出規格
匯出規格定義了所有用量相關資料副本的傳送位置,且可包含 BigQuery 資料集名稱。
| 動作 | 權限 | 資源 |
|---|---|---|
| 查看目前的匯出規格 (要將用量資料匯出至哪個 Cloud Storage bucket 或 BigQuery 資料集) | billing.accounts.getUsageExportSpec |
帳單帳戶 |
| 修改匯出規格 | billing.accounts.updateUsageExportSpec |
帳單帳戶 |