Skip to main content

tokens

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

Overview

Nametokens
TypeResource
Idaws.license_manager.tokens

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
next_tokenstringToken for the next set of results.
tokensarrayReceived token details.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_tokensselectregionLists your tokens.
create_tokeninsertregion, LicenseArn, ClientTokenCreates a long-lived token. A refresh token is a JWT token used to get an access token. With an access token, you can call AssumeRoleWithWebIdentity to get role credentials that you can use to call License Manager to manage the specified license.
delete_tokendeleteregionDeletes the specified token. Must be called in the license home Region.

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)

SELECT examples

Lists your tokens.

SELECT
next_token,
tokens
FROM aws.license_manager.tokens
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a long-lived token. A refresh token is a JWT token used to get an access token. With an access token, you can call AssumeRoleWithWebIdentity to get role credentials that you can use to call License Manager to manage the specified license.

INSERT INTO aws.license_manager.tokens (
LicenseArn,
RoleArns,
ExpirationInDays,
TokenProperties,
ClientToken,
region
)
SELECT
'{{ LicenseArn }}' /* required */,
'{{ RoleArns }}',
{{ ExpirationInDays }},
'{{ TokenProperties }}',
'{{ ClientToken }}' /* required */,
'{{ region }}'
RETURNING
token,
token_id,
token_type
;

DELETE examples

Deletes the specified token. Must be called in the license home Region.

DELETE FROM aws.license_manager.tokens
WHERE region = '{{ region }}' --required
;