启用和停用服务

本页面介绍如何启用和停用 Artifact Registry。

启用服务

  1. In the Trusted Cloud console, on the project selector page, select or create a Trusted Cloud project.

    Go to project selector

  2. Verify that billing is enabled for your Trusted Cloud project.

  3. 如果尚未安装 Google Cloud CLI,请安装并初始化。对于现有安装,请使用以下命令更新 Google Cloud CLI 的组件: gcloud components update

    如需查看 gcloud CLI 的版本,请运行以下命令:

    gcloud version
  4. 通过 Trusted Cloud 控制台或以下 gcloud 命令启用该 API:
    gcloud services enable artifactregistry.googleapis.com
  5. 停用服务

    在停用 Artifact Registry API 之前,请确保要保留的任何工件在其他位置提供。建议您在停用 API 之前先删除代码库。

    在停用 Artifact Registry API 之时,以下条件适用:

    • 代码库和代码库中的工件将无法访问。
    • API 被停用后,系统会在 7 天内删除数据。

    如需通过 Trusted Cloud 控制台停用 API,请执行以下操作:

    控制台

    1. 前往 Artifact Registry 的 API 概览页面。
    2. 选择已启用该 API 的项目。
    3. 点击管理
    4. 点击停用 API

    gcloud

    运行以下命令来为当前项目停用该 API:

    gcloud services disable artifactregistry.googleapis.com
    

    后续步骤