listKeys method

Future<ListKeysResponse> listKeys({
  1. ApiKeyFilter? filter,
  2. int? maxResults,
  3. String? nextToken,
})

Lists API key resources in your Amazon Web Services account.

For more information, see Use API keys to authenticate in the Amazon Location Service Developer Guide.

May throw AccessDeniedException. May throw InternalServerException. May throw ThrottlingException. May throw ValidationException.

Parameter filter : Optionally filter the list to only Active or Expired API keys.

Parameter maxResults : An optional limit for the number of resources returned in a single call.

Default value: 100

Parameter nextToken : The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.

Default value: null

Implementation

Future<ListKeysResponse> listKeys({
  ApiKeyFilter? filter,
  int? maxResults,
  String? nextToken,
}) async {
  final $payload = <String, dynamic>{
    if (filter != null) 'Filter': filter,
    if (maxResults != null) 'MaxResults': maxResults,
    if (nextToken != null) 'NextToken': nextToken,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/metadata/v0/list-keys',
    exceptionFnMap: _exceptionFns,
  );
  return ListKeysResponse.fromJson(response);
}