建立 Access Context Manager 的存取層級

瞭解如何使用Google Cloud 控制台建立 Access Context Manager 的存取層級。

如要完成本快速入門導覽課程,您必須具備 accesscontextmanager.policies.create 權限,這需要在機構層級擁有 Access Context Manager 管理員角色。詳情請參閱「使用身分與存取權管理功能控管存取權」一文。


如要直接在 Google Cloud 控制台按照逐步指南操作,請按一下「Guide me」(逐步引導)

逐步引導


事前準備

  1. 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.
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

  3. Make sure that billing is enabled for your Google Cloud project.

  4. Enable the Access Context Manager and the Cloud Resource Manager APIs.

    Enable the APIs

  5. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

  6. Make sure that billing is enabled for your Google Cloud project.

  7. Enable the Access Context Manager and the Cloud Resource Manager APIs.

    Enable the APIs

設定權限

  1. 在 Google Cloud 控制台頂端,按一下專案選取器 ,然後選取您的機構。

  2. 前往身分與存取權管理頁面。

    前往身分與存取權管理頁面

  3. 按一下「授予存取權」

  4. 在「新增主體」窗格中,執行下列操作:

    1. 在「New principals」(新增主體) 部分輸入使用者電子郵件地址。

    2. 在「請選擇角色」選單中,選取「Access Context Manager」,然後選取「Access Context Manager 管理員」

    3. 按一下 [儲存]

建立存取層級

本快速入門導覽課程提供範例值,可建立基本存取層級範例。 如要建立適用於您環境的存取層級,請參閱「建立基本存取層級」。

  1. 前往 Google Cloud 控制台的「Access Context Manager」頁面。

    前往 Access Context Manager

    系統顯示提示時,請選取專案。

  2. 按一下「建立存取層級」

  3. 在「New access level」(建立新的存取層級) 窗格中執行下列操作:

    1. 在「Access level title」(存取層級標題) 欄位中輸入 quickstart-access-level

    2. 在「條件」部分展開「IP 子網路」,然後輸入 203.0.113.0/24

    3. 按一下 [儲存]

清除所用資源

如要避免系統向您的 Google Cloud 帳戶收取本頁所用資源的費用,請按照下列步驟操作。

刪除專案

如要避免付費,最簡單的方法就是刪除您為了本教學課程所建立的專案。

如要刪除專案:

  1. In the Google Cloud console, go to the Manage resources page.

    Go to Manage resources

  2. In the project list, select the project that you want to delete, and then click Delete.
  3. In the dialog, type the project ID, and then click Shut down to delete the project.

刪除存取層級

建立存取層級不會產生任何費用,但如果您要刪除存取層級,請按照下列步驟操作:

  1. 找到要刪除的存取層級,在該列中按一下觸發條件動作選單 (),然後按一下「Delete」(刪除)

  2. 按一下「Delete」(刪除) 確認操作。

後續步驟