ListTokensCommand

Lists your tokens.

Example Syntax

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

import { LicenseManagerClient, ListTokensCommand } from "@aws-sdk/client-license-manager"; // ES Modules import
// const { LicenseManagerClient, ListTokensCommand } = require("@aws-sdk/client-license-manager"); // CommonJS import
const client = new LicenseManagerClient(config);
const input = { // ListTokensRequest
  TokenIds: [ // StringList
    "STRING_VALUE",
  ],
  Filters: [ // FilterList
    { // Filter
      Name: "STRING_VALUE",
      Values: [ // FilterValues
        "STRING_VALUE",
      ],
    },
  ],
  NextToken: "STRING_VALUE",
  MaxResults: Number("int"),
};
const command = new ListTokensCommand(input);
const response = await client.send(command);
// { // ListTokensResponse
//   Tokens: [ // TokenList
//     { // TokenData
//       TokenId: "STRING_VALUE",
//       TokenType: "STRING_VALUE",
//       LicenseArn: "STRING_VALUE",
//       ExpirationTime: "STRING_VALUE",
//       TokenProperties: [ // MaxSize3StringList
//         "STRING_VALUE",
//       ],
//       RoleArns: [ // ArnList
//         "STRING_VALUE",
//       ],
//       Status: "STRING_VALUE",
//     },
//   ],
//   NextToken: "STRING_VALUE",
// };

ListTokensCommand Input

See ListTokensCommandInput for more details

Parameter
Type
Description
Filters
Filter[] | undefined

Filters to scope the results. The following filter is supported:

  • LicenseArns

MaxResults
number | undefined

Maximum number of results to return in a single call.

NextToken
string | undefined

Token for the next set of results.

TokenIds
string[] | undefined

Token IDs.

ListTokensCommand Output

See ListTokensCommandOutput for details

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

Token for the next set of results.

Tokens
TokenData[] | undefined

Received token details.

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.