tokens
Creates, updates, deletes, gets or lists a tokens resource.
Overview
| Name | tokens |
| Type | Resource |
| Id | aws.license_manager.tokens |
Fields
The following fields are returned by SELECT queries:
- list_tokens
| Name | Datatype | Description |
|---|---|---|
next_token | string | Token for the next set of results. |
tokens | array | Received token details. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_tokens | select | region | Lists your tokens. | |
create_token | insert | region, LicenseArn, ClientToken | 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. | |
delete_token | delete | region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- list_tokens
Lists your tokens.
SELECT
next_token,
tokens
FROM aws.license_manager.tokens
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_token
- Manifest
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
;
# Description fields are for documentation purposes
- name: tokens
props:
- name: region
value: "{{ region }}"
description: Required parameter for the tokens resource.
- name: LicenseArn
value: "{{ LicenseArn }}"
description: |
Amazon Resource Name (ARN) of the license. The ARN is mapped to the aud claim of the JWT token.
- name: RoleArns
value:
- "{{ RoleArns }}"
description: |
Amazon Resource Name (ARN) of the IAM roles to embed in the token. License Manager does not check whether the roles are in use.
- name: ExpirationInDays
value: {{ ExpirationInDays }}
description: |
Token expiration, in days, counted from token creation. The default is 365 days.
- name: TokenProperties
value:
- "{{ TokenProperties }}"
description: |
Data specified by the caller to be included in the JWT token. The data is mapped to the amr claim of the JWT token.
- name: ClientToken
value: "{{ ClientToken }}"
description: |
Idempotency token, valid for 10 minutes.
DELETE examples
- delete_token
Deletes the specified token. Must be called in the license home Region.
DELETE FROM aws.license_manager.tokens
WHERE region = '{{ region }}' --required
;