Manage Gemini for Google Cloud licenses

Before using certain Gemini for Google Cloud products (such as Gemini Code Assist), each user in your organization needs a license.

Before you begin

  • Ensure that you have the Billing Account Administrator (roles/billing.admin) or Consumer Procurement Order Administrator (roles/consumerprocurement.orderAdmin) IAM roles so that you can grant additional permissions required for specific license management tasks detailed in the following sections.
  • If you want to manage licenses using an API rather than the Google Cloud console, then ensure the following:

Change the number of Gemini for Google Cloud licenses in a subscription

You can add or remove the number of Gemini for Google Cloud licenses directly through the Google Cloud console, or through your Google account representative or an authorized reseller.

To perform this task, you must have the following Identity and Access Management (IAM) permissions:

  • billing.accounts.get
  • consumerprocurement.orders.get
  • consumerprocurement.orders.modify

To change the number of licenses in a subscription, follow these steps:

  1. In the Google Cloud console, go to the Admin for Gemini page.

    Go to Admin for Gemini

  2. Choose the subscription that you want to change, and then click Modify Subscription.

  3. Enter the number of licenses that you want to have. The following information is displayed:

    • Number of total licenses after purchase.
    • Number of licenses available for assignment after purchase.
    • New subscription price per term. The additional amount for the added licenses is prorated based on how much time remains in the current term.
  4. Click Save.

View Gemini for Google Cloud license assignments

Console

To view Gemini for Google Cloud license assignments in the Google Cloud console, you must have the following permissions:

  • billing.accounts.get
  • consumerprocurement.orders.get
  • consumerprocurement.licensePools.get
  • consumerprocurement.licensePools.enumerateLicensedUsers
  1. Go to the Admin for Gemini page.

    Go to Admin for Gemini

  2. Choose the subscription that you want to change, and then click Modify Subscription.

    The following information is available for each user that has been assigned a license:

    • Name
    • Email
    • Account type
    • Licenses assigned
  3. To find a specific set of users, you can filter and sort the list as follows:

    • To filter the list, in the Filter field, enter the properties and values.
    • To sort the list, click the heading of the column that you want to sort by. For example, to sort alphabetically by the user names, click the Name column heading.

API

To view Gemini for Google Cloud license assignments, use the billingAccounts.orders.licensePool.enumerateLicensedUsers method.

To perform this task, you must have the consumerprocurement.licensePools.enumerateLicensedUsers permission.

GET https://cloudcommerceconsumerprocurement.googleapis.com/v1/billingAccounts/BILLING_ACCOUNT_ID/orders/ORDER_ID/licensePool:enumerateLicensedUsers/

Replace the following:

  • BILLING_ACCOUNT_ID: the billing account ID
  • ORDER_ID: the IAM policy

If the command succeeds, it returns licensedUsers output in the following format:

{
  "licensedUsers": [
      {
          "username": "dana@example.com",
          "assignTime": "2024-09-26T16:24:40.559222Z"
      },
      {
          "username": "lee@example.com",
          "assignTime": "2024-09-26T16:24:40.559222Z"
      },
      {
          "username": "taylor@example.com",
          "assignTime": "2024-09-26T16:24:40.559222Z"
      },
      {
          "username": "bola@example.com",
          "assignTime": "2024-09-26T16:24:14.610828Z"
      }
  ]
}

Assign Gemini for Google Cloud licenses to individual users

Console

To assign Gemini for Google Cloud licenses to individual users in the Google Cloud console, you must have the following permissions:

  • billing.accounts.get
  • consumerprocurement.orders.get
  • consumerprocurement.licensePools.get
  • consumerprocurement.licensePools.enumerateLicensedUsers
  • consumerprocurement.licensePools.assign
  1. Go to the Admin for Gemini page.

    Go to Admin for Gemini

  2. Choose the subscription that you want to change, and then click Modify Subscription.

  3. Click Assign Licenses. A user selection dialog appears. To search for specific users, enter their name in the search box.

  4. Select one or more users from the list, and then click Next.

  5. Choose the Gemini for Google Cloud services you want to assign licenses for.

  6. Click Assign Licenses.

API

To assign Gemini for Google Cloud licenses, use the billingAccounts.orders.licensePool.assign method.

To perform this task, you must have the consumerprocurement.licensePools.assign permission.

POST https://cloudcommerceconsumerprocurement.googleapis.com/v1/billingAccounts/BILLING_ACCOUNT_ID/orders/ORDER_ID/licensePool:assign/

{
  "usernames": [
            "dana@example.com",
            "lee@example.com"
  ]
}

Replace the following:

  • BILLING_ACCOUNT_ID: the billing account ID
  • ORDER_ID: the IAM policy

If the command succeeds, it returns an empty response body in the following format:

{}

To verify the assignment, view the list of assignments.

Unassign Gemini for Google Cloud licenses

Console

To unassign a license from a user in the Google Cloud console, you must have the following permissions:

  • billing.accounts.get
  • consumerprocurement.orders.get
  • consumerprocurement.licensePools.get
  • consumerprocurement.licensePools.enumerateLicensedUsers
  • consumerprocurement.licensePools.unassign
  1. Go to the Admin for Gemini page.

    Go to Admin for Gemini

  2. Choose the subscription that you want to change, and then click Manage Subscription.

  3. Select the users for which you want to unassign licenses, then click Unassign License.

  4. Click Confirm changes.

API

To unassign Gemini for Google Cloud licenses, use the billingAccounts.orders.licensePool.unassign method.

To perform this task, you must have the consumerprocurement.licensePools.unassign permission.

POST https://cloudcommerceconsumerprocurement.googleapis.com/v1/billingAccounts/BILLING_ACCOUNT_ID/orders/ORDER_ID/licensePool:unassign/

{
  "usernames": [
            "dana@example.com",
            "lee@example.com"
  ]
}

Replace the following:

  • BILLING_ACCOUNT_ID: the billing account ID
  • ORDER_ID: the IAM policy

If the command succeeds, it returns an empty response body in the following format:

{}

To verify the unassignment, view the list of assignments.

Transfer Gemini for Google Cloud licenses

Gemini for Google Cloud licenses cannot be transferred directly between users. Instead, unassign the license from a user and then assign a license to the new user.

Prevent cross-organization license usage

Gemini for Google Cloud licenses are assigned to individual users, not organizations or projects, allowing individual users to use the Gemini for Google Cloud feature across multiple organizations.

Any logs generated from Gemini for Google Cloud usage sits with the project in which the usage occurred, and not with the licensee. Additionally, any customization or configuration of Gemini for Google Cloud (such as Gemini Code Assist code customization) is done on the project, not at the license or subscription level.

To further prevent cross-organization usage of Gemini for Google Cloud in a project, you can do one of the following:

  • Disable the Gemini for Google Cloud API in the project.
  • Use permissions to deny user access to the project.

Limitations