GCP.AgentIdentity reference
AuthProvider
Section titled “AuthProvider”Source:
src/GCP/AgentIdentity/AuthProvider.ts
An Agent Identity auth provider — the credential configuration agents use to call third-party APIs (API keys, 2LO, or 3LO OAuth).
authProviderId and location replace the resource. Description,
labels, scopes, type parameters, and enabled/disabled update in place.
AuthProvider: Creating an Auth Provider
Section titled “AuthProvider: Creating an Auth Provider”API key
const auth = yield* GCP.AgentIdentity.AuthProvider("Maps", { authProviderTypeParams: { apiKey: { apiKey: "maps-api-key" }, }, labels: { env: "prod" },});Three-legged OAuth
const auth = yield* GCP.AgentIdentity.AuthProvider("Atlassian", { authProviderTypeParams: { threeLeggedOauth: { clientId: "jira-client", clientSecret: "jira-secret", authorizationUrl: "https://auth.atlassian.com/authorize", tokenUrl: "https://auth.atlassian.com/oauth/token", enablePkce: true, }, }, allowedScopes: ["read:jira-work"], labels: { env: "prod" },});AuthProvider: Updating an Auth Provider
Section titled “AuthProvider: Updating an Auth Provider”const auth = yield* GCP.AgentIdentity.AuthProvider("Maps", { authProviderId: "maps", authProviderTypeParams: { apiKey: { apiKey: "maps-api-key" }, }, description: "Maps API key for agents", labels: { env: "prod", role: "maps" },});