Feature Description
The gem4gov license group wraps distributeLicenseConfig (distribute) and lists configs (list), but has no user-assignment command. Add gem4gov license assign (plus unassign/reconcile) wrapping the public Discovery Engine batchUpdateUserLicenses REST method, mirroring the existing distribute command's structure.
Use Case
Assigning a license to an individual user currently requires the Gemini Enterprise console "Manage users" page or a manually created REST call (grep -n batchUpdateUserLicenses gem4gov.py → no matches). A CLI command makes assignment scriptable, idempotent, and auditable — producing cleaner audit evidence for license oversight.
Proposed Solution
Add gem4gov license assign wrapping the documented API. Verified schema (Google's public "Get subscriptions and assign licenses" docs):
POST https://{us|eu|}discoveryengine.googleapis.com/v1/projects/{PROJECT_ID}/locations/{LOCATION}/userStores/default_user_store:batchUpdateUserLicenses
body { inlineSource: { userLicenses: [{ userPrincipal, licenseConfig }], updateMask: { paths: ["userPrincipal","licenseConfig"] } }, deleteUnassignedUserLicenses: bool }.
Note: v1 (not v1alpha), default_user_store, licenseConfig is the project-level config path. Unassign = omit licenseConfig + deleteUnassignedUserLicenses: true.
Compliance & Deployment Context
- Target Deployment Type(s):
- Relevant NIST 800-53r5 Controls: AC-2 (account management) — auditable, repeatable license assignment.
Reusability Check
Stellar Engine prioritizes reusability.
Alternatives Considered
Console clicks (not scriptable/auditable at scale); hand-rolled REST calls (works, but every operator reinvents the request shape).
Additional Context
Verified at main @ 3728fc98. Related: #100 (CLI→Terraform conversion).
Feature Description
The
gem4gov licensegroup wrapsdistributeLicenseConfig(distribute) and lists configs (list), but has no user-assignment command. Addgem4gov license assign(plusunassign/reconcile) wrapping the public Discovery EnginebatchUpdateUserLicensesREST method, mirroring the existingdistributecommand's structure.Use Case
Assigning a license to an individual user currently requires the Gemini Enterprise console "Manage users" page or a manually created REST call (
grep -n batchUpdateUserLicenses gem4gov.py→ no matches). A CLI command makes assignment scriptable, idempotent, and auditable — producing cleaner audit evidence for license oversight.Proposed Solution
Add
gem4gov license assignwrapping the documented API. Verified schema (Google's public "Get subscriptions and assign licenses" docs):POST https://{us|eu|}discoveryengine.googleapis.com/v1/projects/{PROJECT_ID}/locations/{LOCATION}/userStores/default_user_store:batchUpdateUserLicensesbody
{ inlineSource: { userLicenses: [{ userPrincipal, licenseConfig }], updateMask: { paths: ["userPrincipal","licenseConfig"] } }, deleteUnassignedUserLicenses: bool }.Note: v1 (not v1alpha),
default_user_store,licenseConfigis the project-level config path. Unassign = omitlicenseConfig+deleteUnassignedUserLicenses: true.Compliance & Deployment Context
Reusability Check
Stellar Engine prioritizes reusability.
licensegroup; no wrapper exists anywhere in the repo.)Alternatives Considered
Console clicks (not scriptable/auditable at scale); hand-rolled REST calls (works, but every operator reinvents the request shape).
Additional Context
Verified at
main@3728fc98. Related: #100 (CLI→Terraform conversion).