auth_tokens
Creates, updates, deletes, gets or lists an auth_tokens resource.
Overview
| Name | auth_tokens |
| Type | Resource |
| Id | google.redis.auth_tokens |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. Name of the auth token. Format: projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user}/authTokens/{auth_token} |
createTime | string (google-datetime) | Output only. Create time of the auth token. |
state | string | Output only. State of the auth token. (STATE_UNSPECIFIED, ACTIVE, CREATING, DELETING) |
token | string | Output only. The service generated authentication token used to connect to the Redis cluster. |
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. Name of the auth token. Format: projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user}/authTokens/{auth_token} |
createTime | string (google-datetime) | Output only. Create time of the auth token. |
state | string | Output only. State of the auth token. (STATE_UNSPECIFIED, ACTIVE, CREATING, DELETING) |
token | string | Output only. The service generated authentication token used to connect to the Redis cluster. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, clustersId, tokenAuthUsersId, authTokensId | Gets a specific auth token for a specific token auth user. | |
list | select | projectsId, locationsId, clustersId, tokenAuthUsersId | orderBy, pageSize, pageToken, filter | Lists all the auth tokens for a specific token auth user. |
delete | delete | projectsId, locationsId, clustersId, tokenAuthUsersId, authTokensId | Removes a auth token for a user of a token based auth enabled instance. |
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 |
|---|---|---|
authTokensId | string | |
clustersId | string | |
locationsId | string | |
projectsId | string | |
tokenAuthUsersId | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string |
SELECT examples
- get
- list
Gets a specific auth token for a specific token auth user.
SELECT
name,
createTime,
state,
token
FROM google.redis.auth_tokens
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND clustersId = '{{ clustersId }}' -- required
AND tokenAuthUsersId = '{{ tokenAuthUsersId }}' -- required
AND authTokensId = '{{ authTokensId }}' -- required
;
Lists all the auth tokens for a specific token auth user.
SELECT
name,
createTime,
state,
token
FROM google.redis.auth_tokens
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND clustersId = '{{ clustersId }}' -- required
AND tokenAuthUsersId = '{{ tokenAuthUsersId }}' -- required
AND orderBy = '{{ orderBy }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
;
DELETE examples
- delete
Removes a auth token for a user of a token based auth enabled instance.
DELETE FROM google.redis.auth_tokens
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND clustersId = '{{ clustersId }}' --required
AND tokenAuthUsersId = '{{ tokenAuthUsersId }}' --required
AND authTokensId = '{{ authTokensId }}' --required
;