Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Gérer l'accès à un notebook
Cette page explique comment accorder et révoquer l'accès à un notebook Colab Enterprise (fichier IPYNB).
Avant de commencer
Sign in to your Google Cloud account. If you're new to
Google Cloud,
create an account to evaluate how our products perform in
real-world scenarios. New customers also get $300 in free credits to
run, test, and deploy workloads.
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
Dans le menu Région, sélectionnez la région qui contient votre notebook.
À côté du notebook que vous souhaitez partager, cliquez sur le menu more_vertActions du notebook, puis sélectionnez Partager.
Dans la fenêtre Autorisations de partage, cliquez sur
Ajouter un
utilisateur/groupe.
Dans la boîte de dialogue Ajouter un utilisateur/groupe, saisissez un ou plusieurs comptes principaux dans le champ Nouveaux comptes principaux, en les séparant par des virgules.
Dans la liste Rôle, sélectionnez l'un des rôles suivants :
Propriétaire du code : peut effectuer n'importe quelle action sur le notebook, y compris le supprimer ou le partager.
Les comptes principaux Colab Enterprise sont des utilisateurs, des groupes ou des domaines.
Vous pouvez accorder l'accès à des utilisateurs, des groupes ou des domaines.
Consultez le tableau ci-dessous :
Compte principal
Exemple de compte utilisateur
Utilisateur unique
user@gmail.com
Groupe Google
admins@googlegroups.com
Domaine Google Workspace
example.com
Désactiver l'enregistrement de la sortie du notebook
Pour empêcher le partage de la sortie de notebook enregistrée avec d'autres utilisateurs ayant accès au fichier notebook, vous pouvez désactiver l'enregistrement de la sortie de notebook.
Lorsque vous désactivez l'enregistrement des résultats pour un notebook sélectionné, Colab Enterprise supprime toutes les sorties enregistrées dans le fichier notebook et n'enregistre pas le résultat des exécutions ultérieures.
Toutefois, les utilisateurs qui ont accès au notebook peuvent toujours afficher son résultat des manières suivantes :
Exécutez le notebook pour afficher ses résultats actuels. Ce résultat n'a pas été enregistré.
Affichez une version d'archivage du notebook et ses résultats dans l'historique des révisions.
Pour désactiver l'enregistrement des résultats pour un notebook sélectionné, procédez comme suit :
Dans la console Google Cloud , accédez à la page Mes notebooks de Colab Enterprise.
Sélectionnez un projet, un dossier ou une organisation.
Recherchez la ligne contenant le compte principal dont vous souhaitez révoquer l'accès. Cliquez ensuite sur editModifier le compte principal sur cette ligne.
Cliquez sur le bouton Supprimer (delete) correspondant au rôle que vous souhaitez révoquer, puis cliquez sur Enregistrer.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/04 (UTC)."],[[["\u003cp\u003eYou can manage access to Colab Enterprise notebooks by granting or revoking access to individual users, Google groups, or entire Google Workspace domains, each with roles such as Code Owner, Code Editor, or Code Viewer.\u003c/p\u003e\n"],["\u003cp\u003eTo manage access, you must have the Colab Enterprise Admin IAM role, which can be granted by an administrator or potentially obtained through custom or other predefined roles.\u003c/p\u003e\n"],["\u003cp\u003eGranting access to a notebook allows users to view all output, even from data they don't have direct access to, which can be prevented by turning off notebook output saving.\u003c/p\u003e\n"],["\u003cp\u003eTurning off notebook output saving deletes all previously saved output in the notebook file and prevents future outputs from being saved, but users can still view output by running the notebook or viewing archival versions in the revision history.\u003c/p\u003e\n"],["\u003cp\u003eRevoking access involves removing the designated role from the principal in the IAM page, remembering that inherited roles must be edited at their original source.\u003c/p\u003e\n"]]],[],null,["# Manage access to a Colab Enterprise notebook\n\nManage access to a notebook\n===========================\n\nThis page describes how you can grant and revoke access to\na Colab Enterprise notebook (IPYNB file).\n\nBefore you begin\n----------------\n\n- Sign in to your Google Cloud account. If you're new to Google Cloud, [create an account](https://console.cloud.google.com/freetrial) to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n-\n\n\n Enable the Vertex AI, Dataform, and Compute Engine APIs.\n\n\n [Enable the APIs](https://console.cloud.google.com/flows/enableapi?apiid=aiplatform.googleapis.com, dataform.googleapis.com, compute.googleapis.com&redirect=https://console.cloud.google.com)\n\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n-\n\n\n Enable the Vertex AI, Dataform, and Compute Engine APIs.\n\n\n [Enable the APIs](https://console.cloud.google.com/flows/enableapi?apiid=aiplatform.googleapis.com, dataform.googleapis.com, compute.googleapis.com&redirect=https://console.cloud.google.com)\n\n### Required roles\n\n\nTo get the permissions that\nyou need to manage access to a Colab Enterprise notebook,\n\nask your administrator to grant you the\n\n\nColab Enterprise Admin ([`roles/aiplatform.colabEnterpriseAdmin`](/vertex-ai/docs/general/access-control#aiplatform.colabEnterpriseAdmin))\nIAM role on the project.\n\n\nFor more information about granting roles, see [Manage access to projects, folders, and organizations](/iam/docs/granting-changing-revoking-access).\n\n\nYou might also be able to get\nthe required permissions through [custom\nroles](/iam/docs/creating-custom-roles) or other [predefined\nroles](/iam/docs/roles-overview#predefined).\n| One or more of the required roles includes the `dataform.repositories.list` permission. Users who are granted the `dataform.repositories.list` permission or the [Code Creator\n| (`roles/dataform.codeCreator`)](/iam/docs/understanding-roles#dataform.codeCreator) role in a project can list the names of code assets in that project by using the Dataform API or the Dataform command-line interface (CLI). Non-administrators using BigQuery Studio can only see code assets that they created or that were shared with them.\n\nGrant access to a notebook\n--------------------------\n\nThis section describes how to grant a principal access to a\nColab Enterprise notebook.\n| **Important:** Users who have access to the notebook can see all output generated by code in the notebook. Users can see this output even if the output contains data from resources that they don't have access to. To prevent saved output from being shared, [turn off notebook output saving](#turn-off-output-saving).\n\nTo grant a principal access to a Colab Enterprise notebook, do the\nfollowing:\n\n1. In the Google Cloud console, go to\n the Colab Enterprise **My notebooks** page.\n\n [Go to My notebooks](https://console.cloud.google.com/vertex-ai/colab/notebooks)\n2. In the **Region** menu, select the region that contains your notebook.\n\n3. Next to the notebook that you want to share, click the\n more_vert**Notebook actions**\n menu and select **Share**.\n\n4. In the **Share permissions** window, click\n **Add\n user/group**.\n\n5. In the **Add user/group** dialog,\n in the **New principals** field, enter one or more\n principals with commas between them.\n\n6. In the **Role** list, select one of the following roles:\n\n - [**Code\n Owner**](/dataform/docs/access-control#dataform.codeOwner): Can perform any action on the notebook, including deleting or sharing it.\n - [**Code\n Editor**](/dataform/docs/access-control#dataform.codeEditor): Can edit the notebook.\n - [**Code\n Viewer**](/dataform/docs/access-control#dataform.codeViewer): Can view the notebook.\n\n | The principal must also have the [Notebook\n | Runtime User (`roles/aiplatform.notebookRuntimeUser`)](/colab/docs/access-control#aiplatform.notebookRuntimeUser) role to run the notebook.\n7. Click **Save**.\n\nColab Enterprise principals are users, groups, or domains\n---------------------------------------------------------\n\nYou can grant access to users, groups, or domains.\nSee the following table:\n\nTurn off notebook output saving\n-------------------------------\n\nTo prevent sharing saved notebook output with other users who have\naccess to the notebook file, you can turn off notebook output saving.\n\nWhen you turn off output saving for a selected notebook,\nColab Enterprise deletes all output saved in the notebook file and\ndoesn't save the output of subsequent runs.\n\nHowever, users who have access to the notebook can still view its output\nin the following ways:\n\n- Run the notebook to view its current output. This output isn't saved.\n\n- View an archival version of the notebook and its output in revision history.\n\nTo turn off output saving for a selected notebook, do the following:\n\n1. In the Google Cloud console, go to\n the Colab Enterprise **My notebooks** page.\n\n [Go to My notebooks](https://console.cloud.google.com/vertex-ai/colab/notebooks)\n2. In the **Region** menu, select the region that contains your notebook.\n\n3. To open a notebook, click its name.\n\n4. Click\n arrow_drop_down **Toggle\n header visibility** \\\u003e\n **Edit** \\\u003e\n **Notebook settings**.\n\n5. In the **Notebook settings** window, select\n **Omit code cell output when saving this notebook**.\n\n6. Click **Save**.\n\n7. Click **Reload**.\n\nRevoke access to a notebook\n---------------------------\n\nTo revoke access to a Colab Enterprise notebook:\n\n1. In the Google Cloud console, go to the **IAM** page.\n\n [Go to IAM](https://console.cloud.google.com/projectselector/iam-admin/iam?supportedpurview=project,folder,organizationId)\n2. Select a project, folder, or organization.\n\n3. Find the row containing the principal whose access you want to revoke. Then,\n click edit **Edit principal** in that\n row.\n\n | **Note:** You cannot edit inherited roles when managing access to a resource. To edit inherited roles, go to the resource where the role was granted.\n4. Click the **Delete** delete button for\n the role that you want to revoke, and then click **Save**.\n\nWhat's next\n-----------\n\n- To learn how to grant access to a runtime template, see [Manage access\n to a runtime template](/colab/docs/manage-access-runtime-template)."]]