Skip to main content

token_with_iams

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

Overview

Nametoken_with_iams
TypeResource
Idaws.sso_oidc.token_with_iams

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_token_with_iaminsertregion, clientId, grantTypeCreates and returns access and refresh tokens for authorized client applications that are authenticated using any IAM entity, such as a service role or user. These tokens might contain defined scopes that specify permissions such as read:profile or write:data. Through downscoping, you can use the scopes parameter to request tokens with reduced permissions compared to the original client application's permissions or, if applicable, the refresh token's scopes. The access token can be used to fetch short-lived credentials for the assigned Amazon Web Services accounts or to access application APIs using bearer authentication. This API is used with Signature Version 4. For more information, see Amazon Web Services Signature Version 4 for API Requests.

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 authorized client applications that are authenticated using any IAM entity, such as a service role or user. These tokens might contain defined scopes that specify permissions such as read:profile or write:data. Through downscoping, you can use the scopes parameter to request tokens with reduced permissions compared to the original client application's permissions or, if applicable, the refresh token's scopes. The access token can be used to fetch short-lived credentials for the assigned Amazon Web Services accounts or to access application APIs using bearer authentication. This API is used with Signature Version 4. For more information, see Amazon Web Services Signature Version 4 for API Requests.

INSERT INTO aws.sso_oidc.token_with_iams (
clientId,
grantType,
code,
refreshToken,
assertion,
scope,
redirectUri,
subjectToken,
subjectTokenType,
requestedTokenType,
codeVerifier,
region
)
SELECT
'{{ clientId }}' /* required */,
'{{ grantType }}' /* required */,
'{{ code }}',
'{{ refreshToken }}',
'{{ assertion }}',
'{{ scope }}',
'{{ redirectUri }}',
'{{ subjectToken }}',
'{{ subjectTokenType }}',
'{{ requestedTokenType }}',
'{{ codeVerifier }}',
'{{ region }}'
RETURNING
access_token,
aws_additional_details,
expires_in,
id_token,
issued_token_type,
refresh_token,
scope,
token_type
;