Turn off Gemini in Colab Enterprise
This document explains how to turn off Gemini in Colab Enterprise.
Before you begin
- To update a Gemini in Colab Enterprise subscription, make sure you have the
billing.subscriptions.updateIdentity and Access Management (IAM) permission. Thebilling.subscriptions.updatepermission is included in theroles/billing.adminIAM role, or you can add the permission to a custom role.
Turn off Gemini in Colab Enterprise
To turn off Gemini in Colab Enterprise, you can remove access for specific users or turn off features within Colab Enterprise .
Remove access for specific users
You can use the Policy Analyzer feature in the Cloud Asset Inventory to find all users with any of the permissions included in the Gemini for Google Cloud Userrole and the Service Usage Consumerrole. The most direct way to achieve this is to run a Policy Analyzer query that checks for the specific role itself, as the role implicitly contains the set of permissions.
-
Use the Policy Analyzer to see which users have the Gemini for Google Cloud Userrole and the Service Usage Consumerrole, or the individual equivalent permissions.
Query by roles
-
Go to the Policy Analyzerpage.
-
In the Analyze policiessection, click Create custom query.
-
In the Select query scope field, choose the Organization, Folder, or Project you want to analyze. This defines the resources (and their IAM policies) that will be checked.
-
Set the parameter to Role.
-
In the Parameter 1field, select Rolefrom the drop-down menu.
-
In the corresponding Select a rolefield, select or type the name of the role: Gemini for Google Cloud User. Note that the full role ID is
roles/cloudaicompanion.user. -
In the Parameter 2field, select Rolefrom the drop-down menu.
-
In the corresponding Select a rolefield, select or type the name of the role: Service Usage Consumer. Note that the full role ID is
roles/serviceusage.serviceUsageConsumer.
-
-
Click Analyze (or Run Query). The results table shows all principals (users, service accounts, groups) that have been granted the Gemini for Google Cloud Userrole and the Service Usage Consumerrole on any resource within your defined scope, whether directly or inherited from a parent resource.
Query by permissions
-
Go to the Policy Analyzerpage.
-
In the Analyze policiessection, click Create custom query.
-
In the Select query scope field, choose the Organization, Folder, or Project you want to analyze. This defines the resources (and their IAM policies) that will be checked.
-
Set the parameter to Permission.
-
In the Parameter 1field, select Permissionfrom the drop-down menu.
-
In the corresponding field, enter
cloudaicompanion.companions.generateChat. -
In the Parameter 2field, select Permissionfrom the drop-down menu.
-
In the corresponding field, enter
cloudaicompanion.companions.generateCode.
-
-
Click Analyze (or Run Query). The results table will show all principals that have any of the listed permissions granted on resources within the scope, regardless of the role they were granted through (such as a predefined role, a custom role, or another predefined role that coincidentally includes those permissions).
-
-
Remove all applicable user Identity and Access Management roles or permissions for Gemini in Colab Enterprise:
-
Go to the IAM & Adminpage.
-
In the Principalcolumn, find a principal for which you want to remove access to Gemini in Colab Enterprise, and then click Edit principalin that row.
-
In the Edit accesspane, do the following:
Remove predefined roles
-
Locate the Gemini for Google Cloud Userrole, and then click Delete role.
-
Locate the Service Usage Consumerrole, and then click Delete role.
Remove custom or alternate roles
- Locate the roles that include the
cloudaicompanion.companions.generateChatandcloudaicompanion.companions.generateCodepermissions, and then click Delete role.
-
-
Click Save.
-
Turn off features within Colab Enterprise
You can also turn off Gemini features from the Colab Enterprise Notebookspage:
-
In the Google Cloud console, go to the Colab Enterprise Notebookspage.
-
Open a notebook.
-
In the Colab Enterprisetoolbar, click pen_spark Help me code.
-
Clear the Gemini features that you want to turn off.
-
Optional: If you are disabling all Gemini for Google Cloud products, then turn off the Gemini for Google Cloud API .
Optional: Turn off the Gemini for Google Cloud API
After you turn off all other Gemini for Google Cloud
products for your project, turn off the Gemini for Google Cloud API
( cloudaicompanion.googleapis.com
). For more information, see Disabling services
.

