設定專案和權限

本頁說明如何建立 Google Cloud 專案、啟用 AML AI、建立驗證憑證,以及授予帳戶一或多個身分與存取權管理角色

  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. Install the Google Cloud CLI.

  3. 如果您使用外部識別資訊提供者 (IdP),請先 使用聯合身分登入 gcloud CLI

  4. 如要初始化 gcloud CLI,請執行下列指令:

    gcloud init
  5. Create or select a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.
    • Create a Google Cloud project:

      gcloud projects create PROJECT_ID

      Replace PROJECT_ID with a name for the Google Cloud project you are creating.

    • Select the Google Cloud project that you created:

      gcloud config set project PROJECT_ID

      Replace PROJECT_ID with your Google Cloud project name.

  6. Verify that billing is enabled for your Google Cloud project.

  7. Enable the required APIs:

    Roles required to enable APIs

    To enable APIs, you need the Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains the serviceusage.services.enable permission. Learn how to grant roles.

    gcloud services enable financialservices.googleapis.com bigquery.googleapis.com cloudkms.googleapis.com
  8. If you're using a local shell, then create local authentication credentials for your user account:

    gcloud auth application-default login

    You don't need to do this if you're using Cloud Shell.

    If an authentication error is returned, and you are using an external identity provider (IdP), confirm that you have signed in to the gcloud CLI with your federated identity.

  9. Grant roles to your user account. Run the following command once for each of the following IAM roles: roles/financialservices.admin, roles/cloudkms.admin, roles/bigquery.admin

    gcloud projects add-iam-policy-binding PROJECT_ID --member="user:USER_IDENTIFIER" --role=ROLE

    Replace the following:

    • PROJECT_ID: your project ID.
    • USER_IDENTIFIER: the identifier for your user account—for example, myemail@example.com.
    • ROLE: the IAM role that you grant to your user account.
  10. Install the Google Cloud CLI.

  11. 如果您使用外部識別資訊提供者 (IdP),請先 使用聯合身分登入 gcloud CLI

  12. 如要初始化 gcloud CLI,請執行下列指令:

    gcloud init
  13. Create or select a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.
    • Create a Google Cloud project:

      gcloud projects create PROJECT_ID

      Replace PROJECT_ID with a name for the Google Cloud project you are creating.

    • Select the Google Cloud project that you created:

      gcloud config set project PROJECT_ID

      Replace PROJECT_ID with your Google Cloud project name.

  14. Verify that billing is enabled for your Google Cloud project.

  15. Enable the required APIs:

    Roles required to enable APIs

    To enable APIs, you need the Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains the serviceusage.services.enable permission. Learn how to grant roles.

    gcloud services enable financialservices.googleapis.com bigquery.googleapis.com cloudkms.googleapis.com
  16. If you're using a local shell, then create local authentication credentials for your user account:

    gcloud auth application-default login

    You don't need to do this if you're using Cloud Shell.

    If an authentication error is returned, and you are using an external identity provider (IdP), confirm that you have signed in to the gcloud CLI with your federated identity.

  17. Grant roles to your user account. Run the following command once for each of the following IAM roles: roles/financialservices.admin, roles/cloudkms.admin, roles/bigquery.admin

    gcloud projects add-iam-policy-binding PROJECT_ID --member="user:USER_IDENTIFIER" --role=ROLE

    Replace the following:

    • PROJECT_ID: your project ID.
    • USER_IDENTIFIER: the identifier for your user account—for example, myemail@example.com.
    • ROLE: the IAM role that you grant to your user account.
  18. 這些角色具備下列必要權限:

    所需權限

    您必須具備下列權限,才能完成快速入門,並在 AML AI 中執行許多重要作業。

    權限 說明
    resourcemanager.projects.get取得 Google Cloud 專案
    resourcemanager.projects.list列出 Google Cloud 專案
    cloudkms.keyRings.create建立 Cloud KMS 金鑰環
    cloudkms.cryptoKeys.create建立 Cloud KMS 金鑰
    financialservices.v1instances.create建立 AML AI 執行個體
    financialservices.operations.get取得 AML AI 作業
    cloudkms.cryptoKeys.getIamPolicy取得 Cloud KMS 金鑰的身分與存取權管理政策
    cloudkms.cryptoKeys.setIamPolicy設定 Cloud KMS 金鑰的身分與存取權管理政策
    bigquery.datasets.create建立 BigQuery 資料集
    bigquery.datasets.get取得 BigQuery 資料集
    bigquery.transfers.get取得 BigQuery 資料移轉服務移轉作業
    bigquery.transfers.update建立或刪除 BigQuery 資料移轉服務移轉作業
    bigquery.datasets.setIamPolicy設定 BigQuery 資料集的 IAM 政策
    bigquery.datasets.update更新 BigQuery 資料集
    financialservices.v1datasets.create建立 AML AI 資料集
    financialservices.v1engineconfigs.create建立 AML AI 引擎設定
    financialservices.v1models.create建立 AML AI 模型
    financialservices.v1backtests.create建立 AML AI 回溯測試結果
    financialservices.v1backtests.exportMetadata從 AML AI 回溯測試結果匯出中繼資料
    financialservices.v1instances.importRegisteredParties將已註冊的當事人匯入 AML AI 執行個體
    financialservices.v1predictions.create建立 AML AI 預測結果
    bigquery.jobs.create建立 BigQuery 工作
    bigquery.tables.getData從 BigQuery 資料表取得資料
    financialservices.v1predictions.delete刪除 AML AI 預測結果
    financialservices.v1backtests.delete刪除 AML AI 回溯測試結果
    financialservices.v1models.delete刪除 AML AI 模型
    financialservices.v1engineconfigs.delete刪除 AML AI 引擎設定
    financialservices.v1datasets.delete刪除 AML AI 資料集
    financialservices.v1instances.delete刪除 AML AI 執行個體
    bigquery.datasets.delete刪除 BigQuery 資料集