Skip to main content

oauth_client_credentials

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

Overview

Nameoauth_client_credentials
TypeResource
Idgoogle.iam.oauth_client_credentials

Fields

NameDatatypeDescription
namestringImmutable. The resource name of the OauthClientCredential. Format: projects/{project}/locations/{location}/oauthClients/{oauth_client}/credentials/{credential}
clientSecretstringOutput only. The system-generated OAuth client secret. The client secret must be stored securely. If the client secret is leaked, you must delete and re-create the client credential. To learn more, see OAuth client and credential security risks and mitigations
disabledbooleanOptional. Whether the OauthClientCredential is disabled. You cannot use a disabled OauthClientCredential.
displayNamestringOptional. A user-specified display name of the OauthClientCredential. Cannot exceed 32 characters.

Methods

NameAccessible byRequired ParamsDescription
getSELECTcredentialsId, locationsId, oauthClientsId, projectsIdGets an individual OauthClientCredential.
listSELECTlocationsId, oauthClientsId, projectsIdLists all OauthClientCredentials in an OauthClient.
createINSERTlocationsId, oauthClientsId, projectsIdCreates a new OauthClientCredential.
deleteDELETEcredentialsId, locationsId, oauthClientsId, projectsIdDeletes an OauthClientCredential. Before deleting an OauthClientCredential, it should first be disabled.
patchUPDATEcredentialsId, locationsId, oauthClientsId, projectsIdUpdates an existing OauthClientCredential.

SELECT examples

Lists all OauthClientCredentials in an OauthClient.

SELECT
name,
clientSecret,
disabled,
displayName
FROM google.iam.oauth_client_credentials
WHERE locationsId = '{{ locationsId }}'
AND oauthClientsId = '{{ oauthClientsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

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

/*+ create */
INSERT INTO google.iam.oauth_client_credentials (
locationsId,
oauthClientsId,
projectsId,
name,
disabled,
displayName
)
SELECT
'{{ locationsId }}',
'{{ oauthClientsId }}',
'{{ projectsId }}',
'{{ name }}',
{{ disabled }},
'{{ displayName }}'
;

UPDATE example

Updates a oauth_client_credentials resource.

/*+ update */
UPDATE google.iam.oauth_client_credentials
SET
name = '{{ name }}',
disabled = true|false,
displayName = '{{ displayName }}'
WHERE
credentialsId = '{{ credentialsId }}'
AND locationsId = '{{ locationsId }}'
AND oauthClientsId = '{{ oauthClientsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified oauth_client_credentials resource.

/*+ delete */
DELETE FROM google.iam.oauth_client_credentials
WHERE credentialsId = '{{ credentialsId }}'
AND locationsId = '{{ locationsId }}'
AND oauthClientsId = '{{ oauthClientsId }}'
AND projectsId = '{{ projectsId }}';