Manage Colab Enterprise runtimes

Manage runtimes

This page describes how to manage a Colab Enterprise runtime, including the following tasks:

  • Start a runtime.
  • Stop a runtime.
  • Disconnect from a runtime.
  • Reconnect to a runtime.
  • Change the runtime that you are connected to.
  • Delete a runtime.

Required roles

To get the permissions that you need to manage a Colab Enterprise runtime, ask your administrator to grant you the Colab Enterprise User ( roles/aiplatform.colabEnterpriseUser ) IAM role on the project. For more information about granting roles, see Manage access to projects, folders, and organizations .

You might also be able to get the required permissions through custom roles or other predefined roles .

Start a runtime

To start a runtime, you can use the Google Cloud console, the gcloud CLI, or the REST API.

Console

To start a runtime:

  1. In the Google Cloud console, go to the Colab Enterprise Runtimespage.

    Go to Runtimes

  2. In the Regionmenu, select the region that contains your runtime.

  3. Select the runtime that you want to start.

  4. Click Start.

gcloud

Before using any of the command data below, make the following replacements:

  • RUNTIME_ID : the ID of your runtime.
  • PROJECT_ID : your project ID.
  • REGION : the region where your runtime is located.

Execute the following command:

Linux, macOS, or Cloud Shell

gcloud  
colab  
runtimes  
start  
 RUNTIME_ID 
  
 \ 
  
--project = 
 PROJECT_ID 
  
 \ 
  
--region = 
 REGION 

Windows (PowerShell)

gcloud  
colab  
runtimes  
start  
 RUNTIME_ID 
  
 ` 
  
--project = 
 PROJECT_ID 
  
 ` 
  
--region = 
 REGION 

Windows (cmd.exe)

gcloud  
colab  
runtimes  
start  
 RUNTIME_ID 
  
^  
--project = 
 PROJECT_ID 
  
^  
--region = 
 REGION 

For more information about the command for creating a runtime template from the command line, see the gcloud CLI documentation .

REST

Before using any of the request data, make the following replacements:

  • REGION : the region where your runtime is located.
  • PROJECT_ID : your project ID.
  • RUNTIME_ID : the ID of your runtime.

HTTP method and URL:

POST https:// REGION 
-aiplatform.googleapis.com/v1/projects/ PROJECT_ID 
/locations/ REGION 
/notebookRuntimes/ RUNTIME_ID 
:start

To send your request, choose one of these options:

curl

Execute the following command:

curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d "" \
"https:// REGION -aiplatform.googleapis.com/v1/projects/ PROJECT_ID /locations/ REGION /notebookRuntimes/ RUNTIME_ID :start"

PowerShell

Execute the following command:

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `
-Method POST `
-Headers $headers `
-Uri "https:// REGION -aiplatform.googleapis.com/v1/projects/ PROJECT_ID /locations/ REGION /notebookRuntimes/ RUNTIME_ID :start" | Select-Object -Expand Content
If successful, the response body contains an instance of Operation .

For more information, see the notebookRuntimes.start REST API documentation .

Stop a runtime

To stop a runtime, you can use the gcloud CLI or the REST API.

gcloud

Before using any of the command data below, make the following replacements:

  • RUNTIME_ID : the ID of your runtime.
  • PROJECT_ID : your project ID.
  • REGION : the region where your runtime is located.

Execute the following command:

Linux, macOS, or Cloud Shell

gcloud  
colab  
runtimes  
stop  
 RUNTIME_ID 
  
 \ 
  
--project = 
 PROJECT_ID 
  
 \ 
  
--region = 
 REGION 

Windows (PowerShell)

gcloud  
colab  
runtimes  
stop  
 RUNTIME_ID 
  
 ` 
  
--project = 
 PROJECT_ID 
  
 ` 
  
--region = 
 REGION 

Windows (cmd.exe)

gcloud  
colab  
runtimes  
stop  
 RUNTIME_ID 
  
^  
--project = 
 PROJECT_ID 
  
^  
--region = 
 REGION 

For more information about the command for stopping a runtime from the command line, see the gcloud CLI documentation .

REST

Before using any of the request data, make the following replacements:

  • REGION : the region where your runtime is located.
  • PROJECT_ID : your project ID.
  • RUNTIME_ID : the ID of your runtime.

HTTP method and URL:

POST https:// REGION 
-aiplatform.googleapis.com/v1/projects/ PROJECT_ID 
/locations/ REGION 
/notebookRuntimes/ RUNTIME_ID 
:start

To send your request, choose one of these options:

curl

Execute the following command:

curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d "" \
"https:// REGION -aiplatform.googleapis.com/v1/projects/ PROJECT_ID /locations/ REGION /notebookRuntimes/ RUNTIME_ID :start"

PowerShell

Execute the following command:

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `
-Method POST `
-Headers $headers `
-Uri "https:// REGION -aiplatform.googleapis.com/v1/projects/ PROJECT_ID /locations/ REGION /notebookRuntimes/ RUNTIME_ID :start" | Select-Object -Expand Content
If successful, the response body contains an instance of Operation .

For more information, see the notebookRuntimes.stop REST API documentation .

Disconnect from a runtime

To disconnect from a runtime:

  1. In the Google Cloud console, go to the Colab Enterprise My notebookspage.

    Go to My notebooks

  2. In the Regionmenu, select the region that contains your notebook.

  3. Open the notebook that you want to disconnect from the runtime.

  4. In the header toolbar, click Runtime > Manage sessions. If you don't see the header toolbar, click Toggle header visibility.

  5. In the Active sessionspane, click the End sessionbutton.

  6. Click Terminate.

Reconnect to a runtime

To reconnect to a runtime:

  1. In the Google Cloud console, go to the Colab Enterprise My notebookspage.

    Go to My notebooks

  2. In the Regionmenu, select the region that contains your notebook.

  3. Open a notebook that was recently disconnected from a runtime.

  4. In the top right corner of the notebook, click Reconnect.

    If the runtime that the notebook was previously connected to is still running, Colab Enterprise connects to it. If that runtime isn't running anymore, it connects to the default runtime.

Change the runtime

To change the runtime that you are connected to:

  1. In the Google Cloud console, go to the Colab Enterprise My notebookspage.

    Go to My notebooks

  2. In the Regionmenu, select the region that contains your notebook.

  3. Open a notebook that is connected to a runtime.

  4. In the top right corner of the notebook, click Additional connection options > Change runtime type.

  5. Complete the dialog to connect to a runtime .

Delete a runtime

To delete a runtime, you can use the Google Cloud console, the gcloud CLI, or the REST API.

Console

To delete a runtime:

  1. In the Google Cloud console, go to the Colab Enterprise Runtimespage.

    Go to Runtimes

  2. In the Regionmenu, select the region that contains your runtime.

  3. Select the runtime that you want to delete.

  4. Click Delete.

  5. Click Confirm.

gcloud

Before using any of the command data below, make the following replacements:

  • RUNTIME_ID : the ID of your runtime.
  • PROJECT_ID : your project ID.
  • REGION : the region where your runtime is located.

Execute the following command:

Linux, macOS, or Cloud Shell

gcloud  
colab  
runtimes  
delete  
 RUNTIME_ID 
  
 \ 
  
--project = 
 PROJECT_ID 
  
 \ 
  
--region = 
 REGION 

Windows (PowerShell)

gcloud  
colab  
runtimes  
delete  
 RUNTIME_ID 
  
 ` 
  
--project = 
 PROJECT_ID 
  
 ` 
  
--region = 
 REGION 

Windows (cmd.exe)

gcloud  
colab  
runtimes  
delete  
 RUNTIME_ID 
  
^  
--project = 
 PROJECT_ID 
  
^  
--region = 
 REGION 

For more information about the command for creating a runtime template from the command line, see the gcloud CLI documentation .

REST

Before using any of the request data, make the following replacements:

  • REGION : the region where your runtime is located.
  • PROJECT_ID : your project ID.
  • RUNTIME_ID : the ID of your runtime.

HTTP method and URL:

DELETE https:// REGION 
-aiplatform.googleapis.com/v1/projects/ PROJECT_ID 
/locations/ REGION 
/notebookRuntimes/ RUNTIME_ID 

To send your request, choose one of these options:

curl

Execute the following command:

curl -X DELETE \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https:// REGION -aiplatform.googleapis.com/v1/projects/ PROJECT_ID /locations/ REGION /notebookRuntimes/ RUNTIME_ID "

PowerShell

Execute the following command:

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `
-Method DELETE `
-Headers $headers `
-Uri "https:// REGION -aiplatform.googleapis.com/v1/projects/ PROJECT_ID /locations/ REGION /notebookRuntimes/ RUNTIME_ID " | Select-Object -Expand Content
If successful, the response body contains an instance of Operation .

For more information, see the notebookRuntimes.delete REST API documentation .

What's next

Create a Mobile Website
View Site in Mobile | Classic
Share by: