listTokens method
Lists your tokens.
May throw ValidationException. May throw AuthorizationException. May throw AccessDeniedException. May throw RateLimitExceededException. May throw ServerInternalException.
Parameter filters
:
Filters to scope the results. The following filter is supported:
-
licenseArns
Parameter maxResults
:
Maximum number of results to return in a single call.
Parameter nextToken
:
Token for the next set of results.
Parameter tokenIds
:
Token IDs.
Implementation
Future<ListTokensResponse> listTokens({
List<Filter>? filters,
int? maxResults,
String? nextToken,
List<String>? tokenIds,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSLicenseManager.ListTokens'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (filters != null) 'Filters': filters,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
if (tokenIds != null) 'TokenIds': tokenIds,
},
);
return ListTokensResponse.fromJson(jsonResponse.body);
}