啟用及停用服務

Artifact Registry 可讓您儲存、管理及保護容器映像檔和建構作業構件。您可以根據工作負載需求啟用或停用 Artifact Registry。

如要瞭解 Artifact Registry 的費用,請參閱「定價」頁面。

如要瞭解如何啟用 Artifact Analysis API,以及安全漏洞掃描的定價,請參閱 Artifact Analysis 說明文件。

正在啟用服務

  1. 登入 Google Cloud 帳戶。如果您是 Google Cloud新手,歡迎 建立帳戶,親自體驗產品的實際應用成效。新客戶還能獲得價值 $300 美元的免費抵免額,能用於執行、測試及部署工作負載。
  2. In the Google Cloud console, on the project selector page, select or create 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 role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

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

  4. In the Google Cloud console, on the project selector page, select or create 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 role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

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

  6. 如果尚未安裝 Google Cloud CLI,請先安裝並初始化。如果是現有安裝項目,請使用下列指令更新 Google Cloud CLI 的元件: gcloud components update。

    如要查看 gcloud CLI 版本,請執行下列指令:

    gcloud version
  7. 從Google Cloud 控制台啟用 API,或使用下列 gcloud 指令:
    gcloud services enable artifactregistry.googleapis.com

正在停用服務

停用 Artifact Registry API 之前,請先確認要保留的所有構件均已存放於其他位置。建議您先刪除存放區,再停用 API。

停用 Artifact Registry API 時,請注意下列事項:

  • 您將無法存取存放區和存放區中的構件。
  • API 停用後,資料可能會在 7 天內刪除。

如要透過 Google Cloud 控制台停用 API,請按照下列步驟操作:

主控台

  1. 前往 Artifact Registry 的「API 總覽」頁面。
  2. 選取已啟用 API 的專案。
  3. 點選「管理」。
  4. 點選「停用 API」。

gcloud

執行下列指令,為目前專案停用 API:

gcloud services disable artifactregistry.googleapis.com

後續步驟