GetAccessTokenCommand

Gets a temporary access token to use with AssumeRoleWithWebIdentity. Access tokens are valid for one hour.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { LicenseManagerClient, GetAccessTokenCommand } from "@aws-sdk/client-license-manager"; // ES Modules import
// const { LicenseManagerClient, GetAccessTokenCommand } = require("@aws-sdk/client-license-manager"); // CommonJS import
const client = new LicenseManagerClient(config);
const input = { // GetAccessTokenRequest
  Token: "STRING_VALUE", // required
  TokenProperties: [ // MaxSize3StringList
    "STRING_VALUE",
  ],
};
const command = new GetAccessTokenCommand(input);
const response = await client.send(command);
// { // GetAccessTokenResponse
//   AccessToken: "STRING_VALUE",
// };

GetAccessTokenCommand Input

See GetAccessTokenCommandInput for more details

Parameter
Type
Description
Token
Required
string | undefined

Refresh token, encoded as a JWT token.

TokenProperties
string[] | undefined

Token properties to validate against those present in the JWT token.

GetAccessTokenCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
AccessToken
string | undefined

Temporary access token.

Throws

Name
Fault
Details
AccessDeniedException
client

Access to resource denied.

AuthorizationException
client

The Amazon Web Services user account does not have permission to perform the action. Check the IAM policy associated with this account.

RateLimitExceededException
client

Too many requests have been submitted. Try again after a brief wait.

ServerInternalException
server

The server experienced an internal error. Try again.

ValidationException
client

The provided input is not valid. Try your request again.

LicenseManagerServiceException
Base exception class for all service exceptions from LicenseManager service.