Untuk pengguna yang memerlukan akses ke data Penagihan Cloud dan Gemini Cloud Assist di Penagihan Cloud, berikan peran IAM di akun Penagihan Cloud yang ditautkan ke project tempat Gemini Cloud Assist API diaktifkan. Administrator biasanya melakukan langkah ini.
Mengaktifkan Gemini Cloud Assist API di Google Cloud project
Bagian ini menjelaskan langkah-langkah yang diperlukan untuk mengaktifkan Gemini Cloud Assist API dalam Google Cloud project.
Di pemilih project, pilih project yang ingin Anda gunakan sebagai project "Gemini".
Anda dapat mengaktifkan Gemini Cloud Assist API di lebih dari satu project. Untuk pengguna Penagihan Cloud yang memiliki
izin tingkat akun penagihan
di akun Penagihan Cloud, sebaiknya gunakan
project administrasi FinOps
untuk menampung API.
Klik Enable.
Halaman akan diperbarui dan menampilkan status API Enabled.
gcloud
In the Google Cloud console, activate Cloud Shell.
Di menu pemilih project, pilih project yang ingin Anda gunakan sebagai project "Gemini".
Anda dapat mengaktifkan Gemini Cloud Assist API di lebih dari satu project. Untuk pengguna Penagihan Cloud yang memiliki
izin tingkat akun penagihan
di akun Penagihan Cloud, sebaiknya gunakan
project administrasi FinOps
untuk menampung API.
Ganti PROJECT_ID dengan Google Cloud project
ID Anda.
Outputnya mirip dengan hal berikut ini:
Waiting for async operation operations/acf.2e2fcfce-8327-4984-9040-a67777082687 to complete...
Operation finished successfully.
Setelah Anda mengaktifkan Gemini Cloud Assist API diGoogle Cloud project yang ditentukan, Gemini Cloud Assist kini tersedia untuk semua pengguna yang memiliki peran IAM yang diperlukan di project yang ditentukan.
Memberikan peran IAM dalam Google Cloud project
Bagian ini menjelaskan langkah-langkah untuk memberikan izin project yang diperlukan untuk menggunakan Gemini Cloud Assist. Di project tempat Anda mengaktifkan Gemini Cloud Assist API, berikan peran IAM berikut kepada pengguna (pokok) di project: Google Cloud
Pengguna Gemini Cloud Assist
Service Usage Consumer
Konsol
Untuk memberikan peran IAM yang diperlukan untuk menggunakan Gemini Cloud Assist, buka halaman IAM & Admin.
Semua pengguna (principal) yang diberi peran ini dapat mengakses fitur Gemini Cloud Assist di konsol Google Cloud dalam project yang ditentukan. Jika pengguna project juga memiliki
akses untuk melihat data Penagihan Cloud,
mereka dapat menggunakan Gemini Cloud Assist di Laporan Penagihan Cloud
dan FinOps Hub untuk mendapatkan bantuan AI dalam membuat laporan biaya dan
meringkas insight utama tentang biaya cloud dan rekomendasi pengoptimalan.
Untuk mengetahui informasi selengkapnya, lihat Ringkasan Gemini Cloud Assist di Penagihan Cloud.
Tugas penyiapan IAM lanjutan untuk project
Daripada menggunakan konsol Google Cloud atau gcloud CLI untuk memberikan peran IAM yang telah ditentukan sebelumnya pada project, Anda dapat melakukan salah satu hal berikut:
Peran khusus
untuk izin project yang Anda buat memerlukan izin berikut untuk
mengakses Gemini Cloud Assist:
geminicloudassist.companions.generateChat
geminicloudassist.companions.generateCode
serviceusage.services.use
Memberikan peran IAM di akun Penagihan Cloud
Untuk pengguna yang memerlukan akses ke data biaya Penagihan Cloud, Anda harus memberikan izin yang memadai di akun Penagihan Cloud untuk mengakses halaman Laporan dan hub FinOps. Untuk menggunakan
Gemini Cloud Assist di Penagihan Cloud, beri pengguna akses
ke akun Penagihan Cloud yang
ditautkan ke project
tempat Gemini Cloud Assist API diaktifkan.
Izin yang diperlukan: untuk panduan mendetail tentang izin yang diperlukan untuk mengakses Laporan Penagihan, lihat bagian Izin yang diperlukan untuk mengakses laporan yang tersedia di artikel "Menganalisis data penagihan dan tren biaya dengan Laporan".
Izin yang diperlukan: untuk panduan mendetail tentang izin yang diperlukan untuk mengakses hub FinOps Penagihan, lihat bagian Izin yang diperlukan untuk mengakses hub FinOps yang tersedia di artikel "Mengoptimalkan biaya dengan hub FinOps".
Memberikan akses: untuk mengetahui panduan cara memberikan akses ke akun Penagihan Cloud, lihat bagian Memperbarui izin pengguna untuk akun Penagihan Cloud yang tersedia di artikel "Mengelola akses ke akun Penagihan Cloud".
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-18 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,["# Set up Gemini Cloud Assist in Cloud Billing\n\n\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------------------------------------------------------------\n\nThis section describes the steps required to enable the\nGemini Cloud Assist API in a Google Cloud project. \n\n### Console\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\n### gcloud\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-----------------------------------------\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\n### Console\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\n### gcloud\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\n### Advanced 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------------------------------------------\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\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)."]]