建立 Access Context Manager 的存取層級
瞭解如何使用Google Cloud 控制台建立 Access Context Manager 的存取層級。
如要完成這份快速入門課程,您必須具備 accesscontextmanager.policies.create
權限,而這需要在機構層級具備 Access Context Manager 管理員角色。詳情請參閱「使用 IAM 控管存取權」。
如要直接在 Google Cloud 控制台按照逐步指南操作,請按一下「Guide me」(逐步引導):
事前準備
- 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.
-
Make sure that billing is enabled for your Google Cloud project.
-
Enable the Access Context Manager and the Cloud Resource Manager APIs.
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
-
Make sure that billing is enabled for your Google Cloud project.
-
Enable the Access Context Manager and the Cloud Resource Manager APIs.
設定權限
在 Google Cloud 控制台頂端,按一下
專案選取器,然後選取您的機構。前往身分與存取權管理頁面。
按一下「授予存取權」
。在「新增主體」窗格中執行下列操作:
在「New principals」(新增主體) 部分輸入使用者電子郵件地址。
在「請選擇角色」中,依序選取「Access Context Manager」和「Access Context Manager Admin」。
按一下 [儲存]。
建立存取層級
本快速入門提供範例值,可用於建立基本存取層級範例。如要建立特定環境的存取層級,請參閱「建立基本存取層級」。
前往 Google Cloud 控制台的「Access Context Manager」頁面。
系統顯示提示時,請選取專案。
按一下「建立存取層級」。
在「New access level」(建立新的存取層級) 窗格中執行下列操作:
在「Access level title」(存取層級標題) 欄位中輸入
quickstart-access-level
。在「條件」部分展開「IP 子網路」,然後輸入
203.0.113.0/24
。按一下 [儲存]。
清除所用資源
如要避免系統向您的 Google Cloud 帳戶收取您在本頁所用資源的費用,請按照下列步驟操作。
刪除專案
如要避免付費,最簡單的方法就是刪除您為了本教學課程所建立的專案。
如要刪除專案:
- In the Google Cloud console, go to the Manage resources page.
- In the project list, select the project that you want to delete, and then click Delete.
- In the dialog, type the project ID, and then click Shut down to delete the project.
刪除存取層級
建立存取層級不會產生任何費用,但如果您要刪除存取層級,請按照下列步驟操作:
在要刪除的存取層級所在的列中,按一下觸發條件動作選單 (
),然後按一下「Delete」(刪除)。按一下「Delete」(刪除) 確認操作。
後續步驟
如要為存取層級新增更多屬性,請參閱「存取層級屬性」。