Skip to main content

auth_configs

Creates, updates, deletes, gets or lists a auth_configs resource.

Overview

Nameauth_configs
TypeResource
Idgoogle.integrations.auth_configs

Fields

NameDatatypeDescription
namestringResource name of the auth config. For more information, see Manage authentication profiles. projects/{project}/locations/{location}/authConfigs/{authConfig}.
descriptionstringA description of the auth config.
certificateIdstringCertificate id for client certificate
createTimestringOutput only. The timestamp when the auth config is created.
creatorEmailstringThe creator's email address. Generated based on the End User Credentials/LOAS role of the user making the call.
credentialTypestringCredential type of the encrypted credential.
decryptedCredentialobjectDefines parameters for a single, canonical credential.
displayNamestringRequired. The name of the auth config.
encryptedCredentialstringAuth credential encrypted by Cloud KMS. Can be decrypted as Credential with proper KMS key.
expiryNotificationDurationarrayUser can define the time to receive notification after which the auth config becomes invalid. Support up to 30 days. Support granularity in hours.
lastModifierEmailstringThe last modifier's email address. Generated based on the End User Credentials/LOAS role of the user making the call.
overrideValidTimestringUser provided expiry time to override. For the example of Salesforce, username/password credentials can be valid for 6 months depending on the instance settings.
reasonstringThe reason / details of the current status.
statestringThe status of the auth config.
updateTimestringOutput only. The timestamp when the auth config is modified.
validTimestringThe time until the auth config is valid. Empty or max value is considered the auth config won't expire.
visibilitystringThe visibility of the auth config.

Methods

NameAccessible byRequired ParamsDescription
projects_locations_auth_configs_getSELECTauthConfigsId, locationsId, projectsIdGets a complete auth config. If the auth config doesn't exist, Code.NOT_FOUND exception will be thrown. Returns the decrypted auth config.
projects_locations_auth_configs_listSELECTlocationsId, projectsIdLists all auth configs that match the filter. Restrict to auth configs belong to the current client only.
projects_locations_products_auth_configs_getSELECTauthConfigsId, locationsId, productsId, projectsIdGets a complete auth config. If the auth config doesn't exist, Code.NOT_FOUND exception will be thrown. Returns the decrypted auth config.
projects_locations_products_auth_configs_listSELECTlocationsId, productsId, projectsIdLists all auth configs that match the filter. Restrict to auth configs belong to the current client only.
projects_locations_auth_configs_createINSERTlocationsId, projectsIdCreates an auth config record. Fetch corresponding credentials for specific auth types, e.g. access token for OAuth 2.0, JWT token for JWT. Encrypt the auth config with Cloud KMS and store the encrypted credentials in Spanner. Returns the encrypted auth config.
projects_locations_products_auth_configs_createINSERTlocationsId, productsId, projectsIdCreates an auth config record. Fetch corresponding credentials for specific auth types, e.g. access token for OAuth 2.0, JWT token for JWT. Encrypt the auth config with Cloud KMS and store the encrypted credentials in Spanner. Returns the encrypted auth config.
projects_locations_auth_configs_deleteDELETEauthConfigsId, locationsId, projectsIdDeletes an auth config.
projects_locations_products_auth_configs_deleteDELETEauthConfigsId, locationsId, productsId, projectsIdDeletes an auth config.
projects_locations_auth_configs_patchUPDATEauthConfigsId, locationsId, projectsIdUpdates an auth config. If credential is updated, fetch the encrypted auth config from Spanner, decrypt with Cloud KMS key, update the credential fields, re-encrypt with Cloud KMS key and update the Spanner record. For other fields, directly update the Spanner record. Returns the encrypted auth config.
projects_locations_products_auth_configs_patchUPDATEauthConfigsId, locationsId, productsId, projectsIdUpdates an auth config. If credential is updated, fetch the encrypted auth config from Spanner, decrypt with Cloud KMS key, update the credential fields, re-encrypt with Cloud KMS key and update the Spanner record. For other fields, directly update the Spanner record. Returns the encrypted auth config.

SELECT examples

Lists all auth configs that match the filter. Restrict to auth configs belong to the current client only.

SELECT
name,
description,
certificateId,
createTime,
creatorEmail,
credentialType,
decryptedCredential,
displayName,
encryptedCredential,
expiryNotificationDuration,
lastModifierEmail,
overrideValidTime,
reason,
state,
updateTime,
validTime,
visibility
FROM google.integrations.auth_configs
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new auth_configs resource.

/*+ create */
INSERT INTO google.integrations.auth_configs (
locationsId,
projectsId,
description,
certificateId,
name,
decryptedCredential,
visibility,
encryptedCredential,
creatorEmail,
lastModifierEmail,
reason,
validTime,
credentialType,
state,
displayName,
expiryNotificationDuration,
overrideValidTime
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ description }}',
'{{ certificateId }}',
'{{ name }}',
'{{ decryptedCredential }}',
'{{ visibility }}',
'{{ encryptedCredential }}',
'{{ creatorEmail }}',
'{{ lastModifierEmail }}',
'{{ reason }}',
'{{ validTime }}',
'{{ credentialType }}',
'{{ state }}',
'{{ displayName }}',
'{{ expiryNotificationDuration }}',
'{{ overrideValidTime }}'
;

UPDATE example

Updates a auth_configs resource.

/*+ update */
UPDATE google.integrations.auth_configs
SET
description = '{{ description }}',
certificateId = '{{ certificateId }}',
name = '{{ name }}',
decryptedCredential = '{{ decryptedCredential }}',
visibility = '{{ visibility }}',
encryptedCredential = '{{ encryptedCredential }}',
creatorEmail = '{{ creatorEmail }}',
lastModifierEmail = '{{ lastModifierEmail }}',
reason = '{{ reason }}',
validTime = '{{ validTime }}',
credentialType = '{{ credentialType }}',
state = '{{ state }}',
displayName = '{{ displayName }}',
expiryNotificationDuration = '{{ expiryNotificationDuration }}',
overrideValidTime = '{{ overrideValidTime }}'
WHERE
authConfigsId = '{{ authConfigsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified auth_configs resource.

/*+ delete */
DELETE FROM google.integrations.auth_configs
WHERE authConfigsId = '{{ authConfigsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';