oauth_client_credentials
Creates, updates, deletes, gets or lists a oauth_client_credentials
resource.
Overview
Name | oauth_client_credentials |
Type | Resource |
Id | google.iam.oauth_client_credentials |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Immutable. The resource name of the OauthClientCredential. Format: projects/{project}/locations/{location}/oauthClients/{oauth_client}/credentials/{credential} |
clientSecret | string | Output 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 |
disabled | boolean | Optional. Whether the OauthClientCredential is disabled. You cannot use a disabled OauthClientCredential. |
displayName | string | Optional. A user-specified display name of the OauthClientCredential. Cannot exceed 32 characters. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | credentialsId, locationsId, oauthClientsId, projectsId | Gets an individual OauthClientCredential. |
list | SELECT | locationsId, oauthClientsId, projectsId | Lists all OauthClientCredentials in an OauthClient. |
create | INSERT | locationsId, oauthClientsId, projectsId | Creates a new OauthClientCredential. |
delete | DELETE | credentialsId, locationsId, oauthClientsId, projectsId | Deletes an OauthClientCredential. Before deleting an OauthClientCredential, it should first be disabled. |
patch | UPDATE | credentialsId, locationsId, oauthClientsId, projectsId | Updates 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.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.iam.oauth_client_credentials (
locationsId,
oauthClientsId,
projectsId,
name,
disabled,
displayName
)
SELECT
'{{ locationsId }}',
'{{ oauthClientsId }}',
'{{ projectsId }}',
'{{ name }}',
{{ disabled }},
'{{ displayName }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: disabled
value: boolean
- name: clientSecret
value: string
- name: displayName
value: string
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 }}';