Skip to main content

auth_providers

Creates, updates, deletes, gets or lists an auth_providers resource.

Overview

Nameauth_providers
TypeResource
Idgoogle.agentidentity.auth_providers

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringIdentifier. The full resource name of the auth_provider. Format: projects/{project}/locations/{location}/authProviders/{auth_provider}
allowedScopesarrayOptional. List of scopes that are allowed to be requested for this auth_provider. If this list is non-empty, only scopes within this list may be requested. If this list is empty, all scopes may be requested. Scopes appearing in blocked_scopes are disallowed even if they appear in allowed_scopes. The number of allowed scopes is limited to 200.
authProviderTypeParamsobjectRequired. AuthProvider type specific parameters. (id: AuthProviderTypeParams)
blockedScopesarrayOptional. List of scopes that are blocked from being requested for this auth_provider. If a scope appears in this list, it will not be requested, even if it also appears in allowed_scopes. blocked_scopes takes precedence over allowed_scopes. The number of blocked scopes is limited to 200.
createTimestring (google-datetime)Output only. [Output only] Create time stamp
deletedbooleanOutput only. This is set to true if the auth_provider is deleted.
descriptionstringOptional. Description of the resource. Must be less than 256 characters.
expireTimestring (google-datetime)Output only. The time when the auth_provider will expire.
labelsobjectOptional. Labels as key value pairs
statestringOutput only. The state of the auth_provider. (STATE_UNSPECIFIED, ENABLED, DISABLED)
updateTimestring (google-datetime)Output only. [Output only] Update time stamp
workloadIdsarrayOptional. Input only. Represents the workload identity in IAM principal:// format of the agent(s) that will use this AuthProvider. Example: principal://agents.global.org-${ORG_ID}.system.id.goog/resources/aiplatform/projects/{PROJECT_ID}/locations/{LOCATIONS}/reasoningEngines/{ID}

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, authProvidersIdGets details of a single AuthProvider.
query_workloadsselectprojectsId, locationsId, authProvidersIdpageSize, pageTokenQueries what all workloads are using a given auth_provider.
queryselectprojectsId, locationsIdpageToken, workloadId, pageSizeQueries what all auth_providers are used by a given workload_id.
listselectprojectsId, locationsIdshowDeleted, pageToken, pageSize, orderBy, filterLists AuthProviders in a given project and location.
createinsertprojectsId, locationsIdauthProviderId, requestIdCreates a new AuthProvider in a given project and location.
patchupdateprojectsId, locationsId, authProvidersIdupdateMask, requestIdUpdates the parameters of a single AuthProvider.
deletedeleteprojectsId, locationsId, authProvidersIdrequestIdDeletes a single AuthProvider.
undeleteexecprojectsId, locationsId, authProvidersIdUndeletes a single AuthProvider.
revoke_authorizationexecprojectsId, locationsId, authProvidersIdRevokes all authorizations for a specific user on an AuthProvider. This deletes all authorization records associated with the user and AuthProvider, effectively revoking access across all agents.
enableexecprojectsId, locationsId, authProvidersIdEnables a single AuthProvider.
disableexecprojectsId, locationsId, authProvidersIdDisables a single AuthProvider.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
authProvidersIdstring
locationsIdstring
projectsIdstring
authProviderIdstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
requestIdstring
showDeletedboolean
updateMaskstring (google-fieldmask)
workloadIdstring

SELECT examples

Gets details of a single AuthProvider.

SELECT
name,
allowedScopes,
authProviderTypeParams,
blockedScopes,
createTime,
deleted,
description,
expireTime,
labels,
state,
updateTime,
workloadIds
FROM google.agentidentity.auth_providers
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND authProvidersId = '{{ authProvidersId }}' -- required
;

INSERT examples

Creates a new AuthProvider in a given project and location.

INSERT INTO google.agentidentity.auth_providers (
data__authProviderTypeParams,
data__allowedScopes,
data__workloadIds,
data__name,
data__blockedScopes,
data__description,
data__labels,
projectsId,
locationsId,
authProviderId,
requestId
)
SELECT
'{{ authProviderTypeParams }}',
'{{ allowedScopes }}',
'{{ workloadIds }}',
'{{ name }}',
'{{ blockedScopes }}',
'{{ description }}',
'{{ labels }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ authProviderId }}',
'{{ requestId }}'
RETURNING
name,
allowedScopes,
authProviderTypeParams,
blockedScopes,
createTime,
deleted,
description,
expireTime,
labels,
state,
updateTime,
workloadIds
;

UPDATE examples

Updates the parameters of a single AuthProvider.

UPDATE google.agentidentity.auth_providers
SET
data__authProviderTypeParams = '{{ authProviderTypeParams }}',
data__allowedScopes = '{{ allowedScopes }}',
data__workloadIds = '{{ workloadIds }}',
data__name = '{{ name }}',
data__blockedScopes = '{{ blockedScopes }}',
data__description = '{{ description }}',
data__labels = '{{ labels }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND authProvidersId = '{{ authProvidersId }}' --required
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
RETURNING
name,
allowedScopes,
authProviderTypeParams,
blockedScopes,
createTime,
deleted,
description,
expireTime,
labels,
state,
updateTime,
workloadIds;

DELETE examples

Deletes a single AuthProvider.

DELETE FROM google.agentidentity.auth_providers
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND authProvidersId = '{{ authProvidersId }}' --required
AND requestId = '{{ requestId }}'
;

Lifecycle Methods

Undeletes a single AuthProvider.

EXEC google.agentidentity.auth_providers.undelete
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@authProvidersId='{{ authProvidersId }}' --required
@@json=
'{
"requestId": "{{ requestId }}"
}'
;