本页面介绍如何启用和停用 Artifact Registry。
启用服务
-
In the Cloud de Confiance console, on the project selector page, select or create a Cloud de Confiance 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 theresourcemanager.projects.create
permission. Learn how to grant roles.
-
Verify that billing is enabled for your Cloud de Confiance project.
- 如果尚未安装 Google Cloud CLI,请安装并初始化。对于现有安装,请使用以下命令更新 Google Cloud CLI 的组件:
gcloud components update
。如需查看 gcloud CLI 的版本,请运行以下命令:
gcloud version
- 通过 Cloud de Confiance 控制台或以下
gcloud
命令启用该 API:gcloud services enable artifactregistry.googleapis.com
- 代码库和代码库中的工件将无法访问。
- API 被停用后,系统会在 7 天内删除数据。
- 前往 Artifact Registry 的 API 概览页面。
- 选择已启用该 API 的项目。
- 点击管理。
- 点击停用 API。
停用服务
在停用 Artifact Registry API 之前,请确保要保留的任何工件在其他位置提供。建议您在停用 API 之前先删除代码库。
在停用 Artifact Registry API 之时,以下条件适用:
如需通过 Cloud de Confiance 控制台停用 API,请执行以下操作:
控制台
gcloud
运行以下命令来为当前项目停用该 API:
gcloud services disable artifactregistry.googleapis.com