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:
-
In the Google Cloud console, go to the Colab Enterprise Runtimes page.
-
In the Region menu, select the region that contains your runtime.
-
Select the runtime that you want to start.
-
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 starting 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
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: