Gemini Code Assist seats
The billing account's orders, the Code Assist licence pool's counts, and each licensed user's email (stored as a hash), assignment day and last use.
Access
- Kind
- A read-only key you paste
- What to give
- Service account
- Why that one
- A service account that can read the billing account's orders and licence pool. Valistry reads who holds a Code Assist licence, since when, and when it was last used; never code, never a prompt.
What it attributes on its own
- From the source
- seat holder (hashed) · the day the licence was assigned · seat-days in the window · when the licence was last used · licences held and licences free
- Needs a rule or a trace
- tokens and models per seat — the licence carries none · team or project · outcome
The addresses it calls
- https://cloudcommerceconsumerprocurement.googleapis.com/v1/billingAccounts/
- https://oauth2.googleapis.com/token
Only these. A call anywhere else is refused before it leaves, and every call is logged.
Connecting it
- Create a service account. IAM → Service accounts → Create, in a project with the Cloud Commerce Consumer Procurement API enabled. Open ↗
- Grant it the three read permissions on the billing account. A custom role with consumerprocurement.orders.get, consumerprocurement.licensePools.get and consumerprocurement.licensePools.enumerateLicensedUsers, granted on the billing account.
- Create a JSON key and paste its two values. Keys → Add key → JSON. Paste client_email and private_key, then the billing account id and the project.
- Click Test and connect. Valistry lists the orders, reads the Code Assist pool, reports how many seats it found, and stores the key only if the read succeeded.
Where the same people use Gemini through the API, the Vertex source carries their tokens; the two join on the same hash of the email.