oauth_client_credentials
Creates, updates, deletes, gets or lists an oauth_client_credentials
resource.
Overview
Name | oauth_client_credentials |
Type | Resource |
Id | google.iam.oauth_client_credentials |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Immutable. Identifier. 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. |
Successful response
Name | Datatype | Description |
---|---|---|
oauthClientCredentials | array | A list of OauthClientCredentials. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , oauthClientsId , credentialsId | Gets an individual OauthClientCredential. | |
list | select | projectsId , locationsId , oauthClientsId | Lists all OauthClientCredentials in an OauthClient. | |
create | insert | projectsId , locationsId , oauthClientsId | oauthClientCredentialId | Creates a new OauthClientCredential. |
patch | update | projectsId , locationsId , oauthClientsId , credentialsId | updateMask | Updates an existing OauthClientCredential. |
delete | delete | projectsId , locationsId , oauthClientsId , credentialsId | Deletes an OauthClientCredential. Before deleting an OauthClientCredential, it should first be disabled. |
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.
Name | Datatype | Description |
---|---|---|
credentialsId | string | |
locationsId | string | |
oauthClientsId | string | |
projectsId | string | |
oauthClientCredentialId | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Gets an individual OauthClientCredential.
SELECT
name,
clientSecret,
disabled,
displayName
FROM google.iam.oauth_client_credentials
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND oauthClientsId = '{{ oauthClientsId }}' -- required
AND credentialsId = '{{ credentialsId }}' -- required;
Lists all OauthClientCredentials in an OauthClient.
SELECT
oauthClientCredentials
FROM google.iam.oauth_client_credentials
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND oauthClientsId = '{{ oauthClientsId }}' -- required;
INSERT
examples
- create
- Manifest
Creates a new OauthClientCredential.
INSERT INTO google.iam.oauth_client_credentials (
data__name,
data__disabled,
data__displayName,
projectsId,
locationsId,
oauthClientsId,
oauthClientCredentialId
)
SELECT
'{{ name }}',
{{ disabled }},
'{{ displayName }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ oauthClientsId }}',
'{{ oauthClientCredentialId }}'
RETURNING
name,
clientSecret,
disabled,
displayName
;
# Description fields are for documentation purposes
- name: oauth_client_credentials
props:
- name: projectsId
value: string
description: Required parameter for the oauth_client_credentials resource.
- name: locationsId
value: string
description: Required parameter for the oauth_client_credentials resource.
- name: oauthClientsId
value: string
description: Required parameter for the oauth_client_credentials resource.
- name: name
value: string
description: >
Immutable. Identifier. The resource name of the OauthClientCredential. Format: `projects/{project}/locations/{location}/oauthClients/{oauth_client}/credentials/{credential}`
- name: disabled
value: boolean
description: >
Optional. Whether the OauthClientCredential is disabled. You cannot use a disabled OauthClientCredential.
- name: displayName
value: string
description: >
Optional. A user-specified display name of the OauthClientCredential. Cannot exceed 32 characters.
- name: oauthClientCredentialId
value: string
UPDATE
examples
- patch
Updates an existing OauthClientCredential.
UPDATE google.iam.oauth_client_credentials
SET
data__name = '{{ name }}',
data__disabled = {{ disabled }},
data__displayName = '{{ displayName }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND oauthClientsId = '{{ oauthClientsId }}' --required
AND credentialsId = '{{ credentialsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
clientSecret,
disabled,
displayName;
DELETE
examples
- delete
Deletes an OauthClientCredential. Before deleting an OauthClientCredential, it should first be disabled.
DELETE FROM google.iam.oauth_client_credentials
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND oauthClientsId = '{{ oauthClientsId }}' --required
AND credentialsId = '{{ credentialsId }}' --required;