Skip to main content

tokens

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

Overview

Nametokens
TypeResource
Idaws.sso_oidc.tokens

Fields

The following fields are returned by SELECT queries:

SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
create_tokeninsertregion, clientId, clientSecret, grantTypeCreates and returns access and refresh tokens for clients that are authenticated using client secrets. The access token can be used to fetch short-lived credentials for the assigned AWS accounts or to access application APIs using bearer authentication.

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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

INSERT examples

Creates and returns access and refresh tokens for clients that are authenticated using client secrets. The access token can be used to fetch short-lived credentials for the assigned AWS accounts or to access application APIs using bearer authentication.

INSERT INTO aws.sso_oidc.tokens (
clientId,
clientSecret,
grantType,
deviceCode,
code,
refreshToken,
scope,
redirectUri,
codeVerifier,
region
)
SELECT
'{{ clientId }}' /* required */,
'{{ clientSecret }}' /* required */,
'{{ grantType }}' /* required */,
'{{ deviceCode }}',
'{{ code }}',
'{{ refreshToken }}',
'{{ scope }}',
'{{ redirectUri }}',
'{{ codeVerifier }}',
'{{ region }}'
RETURNING
access_token,
expires_in,
id_token,
refresh_token,
token_type
;