管理对笔记本的访问权限
本页面介绍了如何授予和撤消对 Colab Enterprise 笔记本(IPYNB 文件)的访问权限。
准备工作
- 登录您的 Google Cloud 账号。如果您是 Google Cloud新手,请 创建一个账号来评估我们的产品在实际场景中的表现。新客户还可获享 $300 赠金,用于运行、测试和部署工作负载。
-
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 theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
Enable the Vertex AI, Dataform, and Compute Engine APIs.
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin), which contains theserviceusage.services.enablepermission. Learn how to grant roles.-
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 theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
Enable the Vertex AI, Dataform, and Compute Engine APIs.
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin), which contains theserviceusage.services.enablepermission. Learn how to grant roles.
所需的角色
如需获得管理对 Colab Enterprise 笔记本的访问权限所需的权限,请让您的管理员为您授予项目的 Colab Enterprise Admin (roles/aiplatform.colabEnterpriseAdmin) IAM 角色。如需详细了解如何授予角色,请参阅管理对项目、文件夹和组织的访问权限。
授予对笔记本的访问权限
本部分介绍了如何向正文授予对 Colab Enterprise 笔记本的访问权限。
如需向正文授予对 Colab Enterprise 笔记本的访问权限,请执行以下操作:
-
在 Google Cloud 控制台中,前往 Colab Enterprise 我的笔记本页面。
-
在区域菜单中,选择包含笔记本的区域。
-
在要共享的笔记本旁边,点击 笔记本操作菜单,然后选择共享。
-
在共享权限窗口中,点击 添加用户/群组。
-
在添加用户/群组对话框的新的主账号字段中,输入一个或多个主账号(以英文逗号分隔)。
-
在角色列表中,选择以下角色之一:
- Code Owner:可以对笔记本执行任何操作,包括删除或共享笔记本。
- Code Editor:可以修改笔记本。
- Code Viewer:可以查看笔记本。
-
点击保存。
Colab Enterprise 主账号是用户、群组或网域
您可以向用户、群组或网域授予访问权限。请参阅下表:
| 主账号 | 示例用户账号 |
|---|---|
| 单个用户 | user@gmail.com |
| Google 群组 | admins@googlegroups.com |
| Google Workspace 网域 | example.com |
关闭笔记本输出保存
如需阻止与有权访问笔记本文件的其他用户共享保存的笔记本输出,您可以关闭笔记本输出保存功能。
为所选笔记本停用输出保存功能后,Colab Enterprise 会删除笔记本文件中保存的所有输出,且不会保存后续运行的输出。
但是,有权访问笔记本的用户仍可以通过以下方式查看其输出:
运行笔记本以查看其当前输出。此输出不会保存。
在修订历史记录中查看笔记本的归档版本及其输出。
如需为所选笔记本停用输出保存功能,请执行以下操作:
-
在 Google Cloud 控制台中,前往 Colab Enterprise 我的笔记本页面。
-
在区域菜单中,选择包含笔记本的区域。
-
如需打开笔记本,请点击其名称。
-
依次点击 切换标题显示 > 修改 > 笔记本设置。
-
在笔记本设置窗口中,选择保存此笔记本时忽略代码单元格输出项。
-
点击保存。
-
点击重新加载。
撤销对笔记本的访问权限
如需撤消对 Colab Enterprise 笔记本的访问权限,请执行以下操作:
在 Google Cloud 控制台中,前往 IAM 页面。
选择一个项目、文件夹或组织。
找到包含要撤消其访问权限的主账号的行。然后,点击该行中的 修改主账号。
点击要撤消的角色对应的删除 按钮,然后点击保存。
后续步骤
- 如需了解如何授予对运行时模板的访问权限,请参阅管理对运行时模板的访问权限。