Before you can use Gemini Cloud Assist, your administrator needs to perform the setup steps that are described in this document.
Console
Go to the Gemini for Google Cloud page.
Click Get Gemini Cloud Assist.
In the Get Gemini Cloud Assist dialog, do the following:
Click the
expander arrow found in the Required & recommended APIs section.In the Recommended APIs list, select the APIs you want to enable.
Click Enable Gemini Cloud Assist.
Grant the IAM roles that are required to use Gemini Cloud Assist.
Go to the IAM & Admin page.
In the Principal column, find a principal for which you want to give access to Gemini Cloud Assist, and then click Edit principal in that row.
In the Edit access pane, click
Add another role.In Select a role, select Gemini for Google Cloud User.
Click Add another role and select Recommender Viewer.
If the principal wants to get assistance with products they don't already have access to, you might need to grant them additional IAM roles by clicking Add another role and selecting additional roles. See IAM requirements for using Gemini Cloud Assist for a table of IAM roles that enable an optimal Gemini Cloud Assist experience for different products.
Click Save.
gcloud
-
In the Google Cloud console, activate Cloud Shell.
Enable the Gemini for Google Cloud API using the
gcloud services enable
command:gcloud services enable cloudaicompanion.googleapis.com
If you want to enable the Gemini for Google Cloud API in a different Google Cloud project, add the
--project
parameter:gcloud services enable cloudaicompanion.googleapis.com --project PROJECT_ID
Replace
PROJECT_ID
with your Google Cloud project ID.The output is similar to the following:
Waiting for async operation operations/acf.2e2fcfce-8327-4984-9040-a67777082687 to complete... Operation finished successfully.
Grant IAM roles in a Google Cloud project. For more information, see Grant a single role and
gcloud projects add-iam-policy-binding
.Grant the Gemini for Google Cloud User role:
gcloud projects add-iam-policy-binding PROJECT_ID \ --member=PRINCIPAL --role=roles/cloudaicompanion.user
Replace
PRINCIPAL
with the identifier for the principal. The identifier takes the formuser|group|serviceAccount:email
ordomain:domain
—for example,user:cloudysanfrancisco@gmail.com
,group:admins@example.com
,serviceAccount:test123@example.domain.com
, ordomain:example.domain.com
.The output is a list of policy bindings that includes the following:
- members: - user:PRINCIPAL role: roles/cloudaicompanion.user
Repeat the previous step for the role
roles/recommender.viewer
.If the principal wants to get assistance with products they don't already have access to, you might need to grant them additional IAM roles. See IAM requirements for using Gemini Cloud Assist for a table of IAM roles that enable an optimal Gemini Cloud Assist experience for different products.