Para los usuarios que necesitan acceso a los datos de Facturación de Cloud y a Gemini Cloud Assist en Facturación de Cloud, otorga roles de IAM en la cuenta de Facturación de Cloudvinculada al proyecto en el que está habilitada la API de Gemini Cloud Assist. Por lo general, un administrador realiza este paso.
Habilita la API de Gemini Cloud Assist en un Google Cloud proyecto
En esta sección, se describen los pasos necesarios para habilitar la API de Gemini Cloud Assist en un proyecto de Google Cloud .
Console
Para habilitar la API de Gemini Cloud Assist, ve a la página de la API de Gemini Cloud Assist.
Reemplaza PROJECT_ID por el ID de tu proyecto Google Cloud .
El resultado es similar a este:
Waiting for async operation operations/acf.2e2fcfce-8327-4984-9040-a67777082687 to complete...
Operation finished successfully.
Después de habilitar la API de Gemini Cloud Assist en el proyecto deGoogle Cloud especificado, Gemini Cloud Assist ahora está disponible para todos los usuarios que tengan los roles de IAM requeridos en el proyecto especificado.
Otorga roles de IAM en un proyecto de Google Cloud
En esta sección, se describen los pasos para otorgar los permisos de proyecto necesarios para usar Gemini Cloud Assist. En el proyecto Google Cloud en el que habilitaste la API de Gemini Cloud Assist, otorga los siguientes roles de IAM a los usuarios (principales) del proyecto:
Usuario de Gemini Cloud Assist
Consumidor de Service Usage
Console
Para otorgar los roles de IAM necesarios para usar Gemini Cloud Assist, ve a la página IAM y administración.
En la columna Principal, busca una principal para la que deseas habilitar el acceso a Gemini Cloud Assist y, luego, haz clic en editEditar principal en esa fila.
En el panel Editar permisos, haz clic en addAgregar otra función.
En Selecciona un rol, selecciona Usuario de Gemini Cloud Assist.
Haz clic en Agregar otro rol y selecciona Consumidor de Service Usage.
Haz clic en Guardar.
gcloud
In the Google Cloud console, activate Cloud Shell.
Todos los usuarios (principales) a los que se les otorgan estos roles pueden acceder a las funciones de Gemini Cloud Assist en la Google Cloud consola dentro del proyecto especificado. Si los usuarios del proyecto también tienen acceso para ver los datos de Facturación de Cloud, pueden usar Gemini Cloud Assist en los Informes de Facturación de Cloud y en FinOps Hub para obtener asistencia de IA para crear informes de costos y resumir estadísticas clave sobre los costos de la nube y las recomendaciones de optimización.
Para obtener más información, consulta la descripción general de Gemini Cloud Assist en la Facturación de Cloud.
Tareas avanzadas de configuración de IAM para proyectos
En lugar de usar la consola de Google Cloud o gcloud CLI para otorgar roles de IAM predefinidos en un proyecto, puedes hacer lo siguiente:
Cualquier rol personalizado para los permisos de proyecto que crees necesita los siguientes permisos para acceder a Gemini Cloud Assist:
geminicloudassist.companions.generateChat
geminicloudassist.companions.generateCode
serviceusage.services.use
Otorga roles de IAM en una cuenta de Facturación de Cloud
Para los usuarios que necesitan acceso a los datos de costos de Facturación de Cloud, debes otorgar permisos en la cuenta de Facturación de Cloud que sean adecuados para acceder a la página Informes y a FinOps Hub. Para usar Gemini Cloud Assist en Facturación de Cloud, otorga a los usuarios acceso a la cuenta de Facturación de Cloud que está vinculada al proyecto en el que está habilitada la API de Gemini Cloud Assist.
Permisos necesarios: Para obtener una guía detallada sobre los permisos necesarios para acceder a los Informes de facturación, consulta la sección Permisos necesarios para acceder a los informes disponible en el artículo "Analiza los datos de facturación y las tendencias de costos con Informes".
Permisos necesarios: Para obtener una guía detallada sobre los permisos necesarios para acceder al FinOps Hub de facturación, consulta la sección Permisos necesarios para acceder a FinOps Hub disponible en el artículo "Optimiza los costos con FinOps Hub".
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-09-03 (UTC)"],[[["\u003cp\u003ePre-GA offerings, like this product or feature, are subject to the "Pre-GA Offerings Terms" and are available "as is" with potentially limited support.\u003c/p\u003e\n"],["\u003cp\u003eSetting up Gemini Cloud Assist requires enabling the Gemini for Google Cloud API in a Google Cloud project, typically performed by an administrator.\u003c/p\u003e\n"],["\u003cp\u003eTo access Gemini Cloud Assist, users need specific Identity and Access Management (IAM) roles, including "Gemini for Google Cloud User" and "Service Usage Consumer," granted at the project level.\u003c/p\u003e\n"],["\u003cp\u003eUsers who need to use Gemini Cloud Assist in Cloud Billing reports also require appropriate IAM roles granted in the linked Cloud Billing account.\u003c/p\u003e\n"],["\u003cp\u003eAdministrators can manage IAM roles for Gemini Cloud Assist either via the Google Cloud console, gcloud CLI, IAM REST APIs, client libraries or by creating and granting custom roles.\u003c/p\u003e\n"]]],[],null,["\u003cbr /\u003e\n\n|\n| **Preview**\n|\n|\n| This product or feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA products and features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nTo set up\n[Gemini Cloud Assist in Cloud Billing](/billing/docs/how-to/gemini/overview),\nperform the following steps:\n\n1. [Enable the Gemini Cloud Assist API in a Google Cloud project](#enable-api).\n An administrator typically performs this step.\n\n2. [In the Google Cloud project, grant Identity and Access Management (IAM) roles](#grant-iam)\n to the same users who access Cloud Billing cost and utilization\n data. An administrator typically performs this step.\n\n3. For users who need access to Cloud Billing data and\n Gemini Cloud Assist in Cloud Billing,\n [grant IAM roles in the Cloud Billing account](#grant-billing-iam)\n that's\n [linked to the project](/billing/docs/how-to/view-linked#view-all-projects-ba-links)\n where the Gemini Cloud Assist API is enabled. An administrator\n typically performs this step.\n\nEnable the Gemini Cloud Assist API in a Google Cloud project\n\nThis section describes the steps required to enable the\nGemini Cloud Assist API in a Google Cloud project. \n\nConsole\n\n1. To enable the Gemini Cloud Assist API, go to the\n **Gemini Cloud Assist API** page.\n\n [Go to the Gemini Cloud Assist API](https://console.cloud.google.com/marketplace/product/google/geminicloudassist.googleapis.com)\n2. In the project selector, select the project you want to use as a\n \"Gemini\" project.\n\n You can enable the Gemini Cloud Assist API in more than one\n project. For Cloud Billing users who have\n [billing-account-level permissions](/billing/docs/how-to/reports#required-permissions)\n on the Cloud Billing account, we recommend that you use a\n [FinOps administration project](/billing/docs/how-to/create-billing-account#set-up-billing-project)\n to contain the API.\n3. Click **Enable**.\n\n The page updates and shows a status of **API Enabled**.\n\ngcloud\n\n\n1. In the Google Cloud console, activate Cloud Shell.\n\n [Activate Cloud Shell](https://console.cloud.google.com/?cloudshell=true)\n2. In the project selector menu, select the project you want to use as a\n \"Gemini\" project.\n\n You can enable the Gemini Cloud Assist API in more than one\n project. For Cloud Billing users who have\n [billing-account-level permissions](/billing/docs/how-to/reports#required-permissions)\n on the Cloud Billing account, we recommend that you use a\n [FinOps administration project](/billing/docs/how-to/create-billing-account#set-up-billing-project)\n to contain the API.\n3. Enable the Gemini Cloud Assist API using\n the [`gcloud services enable` command](/sdk/gcloud/reference/services/enable):\n\n gcloud services enable geminicloudassist.googleapis.com\n\n If you want to enable the Gemini Cloud Assist API in a different\n Google Cloud project, add the\n `--project` parameter: \n\n gcloud services enable geminicloudassist.googleapis.com --project \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e\n\n Replace \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e with your Google Cloud project\n ID.\n\n The output is similar to the following: \n\n ```\n Waiting for async operation operations/acf.2e2fcfce-8327-4984-9040-a67777082687 to complete...\n Operation finished successfully.\n ```\n\nAfter you enable the Gemini Cloud Assist API in the specified\nGoogle Cloud project, Gemini Cloud Assist is now available to\nall users who have the\n[required IAM roles](#grant-iam)\non the specified project.\n\nGrant IAM roles in a Google Cloud project\n\nThis section describes the steps to grant the required project permissions to\nuse Gemini Cloud Assist. In the Google Cloud project where you\nenabled the Gemini Cloud Assist API, grant the following\nIAM roles to users\n([principals](/iam/docs/overview#concepts_related_identity))\non the project:\n\n- Gemini Cloud Assist User\n- Service Usage Consumer\n\nConsole\n\n1. To grant the IAM roles that are required to use\n Gemini Cloud Assist, go to the **IAM \\& Admin** page.\n\n [Go to IAM \\& Admin](https://console.cloud.google.com/projectselector/iam-admin/iam?supportedpurview=)\n2. In the **Principal** column, find a\n [principal](/iam/docs/overview#concepts_related_identity)\n for which you want to enable access to Gemini Cloud Assist, and\n then click edit **Edit principal** in\n that row.\n\n3. In the **Edit access** pane, click\n add **Add another role**.\n\n4. In **Select a role** , select **Gemini Cloud Assist User**.\n\n5. Click **Add another role** and select **Service Usage Consumer**.\n\n6. Click **Save**.\n\ngcloud\n\n\n1. In the Google Cloud console, activate Cloud Shell.\n\n [Activate Cloud Shell](https://console.cloud.google.com/?cloudshell=true)\n2. In the project selector menu, select a project.\n\n3. Grant the **Gemini Cloud Assist User** role:\n\n ```\n gcloud projects add-iam-policy-binding PROJECT_ID \\\n --member=PRINCIPAL --role=roles/geminicloudassist.user\n ```\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of your Google Cloud project---for example,`1234567890`.\n - \u003cvar translate=\"no\"\u003ePRINCIPAL\u003c/var\u003e: the [identifier](/iam/docs/principal-identifiers) for the principal---for example, `user:cloudysanfrancisco@gmail.com`.\n\n The output is a list of policy bindings that includes the following: \n\n - members:\n - user:\u003cvar translate=\"no\"\u003ePRINCIPAL\u003c/var\u003e\n role: roles/geminicloudassist.user\n\n4. Repeat the previous step for the role `roles/serviceusage.serviceUsageConsumer`.\n\nFor more information, see\n[Grant a single role](/iam/docs/granting-changing-revoking-access#grant-single-role)\nand\n[`gcloud projects add-iam-policy-binding`](/sdk/gcloud/reference/projects/add-iam-policy-binding).\n\nAll of the users (principals) who are granted these roles can access\nGemini Cloud Assist features in the Google Cloud console within the\nspecified project. If the project users also have\n[access to view Cloud Billing data](#grant-billing-iam),\nthey can use Gemini Cloud Assist in Cloud Billing **Reports**\nand the **FinOps hub** to get AI assistance to create cost reports and to\nsummarize key insights about cloud costs and optimization recommendations.\nFor more information, see\n[Gemini Cloud Assist in Cloud Billing overview](/billing/docs/how-to/gemini/overview).\n\nAdvanced IAM setup tasks for projects\n\nInstead of using the Google Cloud console or the gcloud CLI to\ngrant predefined IAM roles on a project, you can do any of the\nfollowing:\n\n- Use [IAM REST APIs](/iam/docs/reference/rest)\n or [IAM client libraries](/iam/docs/reference/libraries)\n to grant roles.\n\n If you use these interfaces, use the fully qualified role names:\n - `roles/geminicloudassist.user`\n - `roles/serviceusage.serviceUsageConsumer`\n\n For more information about granting roles, see\n [Manage access to projects, folders, and organizations](/iam/docs/granting-changing-revoking-access).\n- Create and grant custom roles.\n\n Any [custom roles](/iam/docs/creating-custom-roles)\n for *project* permissions that you create need the following permissions to\n access Gemini Cloud Assist:\n - `geminicloudassist.companions.generateChat`\n - `geminicloudassist.companions.generateCode`\n - `serviceusage.services.use`\n\nGrant IAM roles in a Cloud Billing account\n\nFor users who need access to Cloud Billing cost data, you need to grant\npermissions on the Cloud Billing account that are adequate to access\nthe **Reports** page and the **FinOps hub** . To use\nGemini Cloud Assist in Cloud Billing, grant users access\nto the Cloud Billing account that is\n[linked to the project](/billing/docs/how-to/view-linked#view-all-projects-ba-links)\nwhere the Gemini Cloud Assist API is enabled.\n\n- Required permissions: for detailed guidance about the permissions\n required to access Billing **Reports** , see the\n [Permissions required to access reports](/billing/docs/how-to/reports#required-permissions)\n section available in the\n \"Analyze billing data and cost trends with Reports\" article.\n\n- Required permissions: for detailed guidance about the permissions\n required to access the Billing **FinOps hub** , see the\n [Permissions required to access the FinOps hub](/billing/docs/how-to/finops-hub#required-permissions)\n section available in the\n \"Optimize costs with FinOps hub\" article.\n\n- Grant access: for guidance on how to grant access to a\n Cloud Billing account, see the\n [Update user permissions for a Cloud Billing account](/billing/docs/how-to/grant-access-to-billing#update-cloud-billing-permissions)\n section available in the\n \"Manage access to Cloud Billing accounts\" article.\n\nWhat's next\n\n- Learn more about [AI assistance that's available in Gemini Cloud Assist in Cloud Billing](/billing/docs/how-to/gemini/overview).\n- Learn more about the different [types of generative AI assistance available in Gemini Cloud Assist](/gemini/docs/overview).\n- Learn [how Gemini Cloud Assist uses your data](/gemini/docs/discover/data-governance).\n- Learn more about [Google Cloud compliance](/security/compliance)."]]