getApiKeys method

Future<ApiKeys> getApiKeys({
  1. String? customerId,
  2. bool? includeValues,
  3. int? limit,
  4. String? nameQuery,
  5. String? position,
})

Gets information about the current ApiKeys resource.

May throw BadRequestException. May throw UnauthorizedException. May throw TooManyRequestsException.

Parameter customerId : The identifier of a customer in AWS Marketplace or an external system, such as a developer portal.

Parameter includeValues : A boolean flag to specify whether (true) or not (false) the result contains key values.

Parameter limit : The maximum number of returned results per page. The default value is 25 and the maximum value is 500.

Parameter nameQuery : The name of queried API keys.

Parameter position : The current pagination position in the paged result set.

Implementation

Future<ApiKeys> getApiKeys({
  String? customerId,
  bool? includeValues,
  int? limit,
  String? nameQuery,
  String? position,
}) async {
  final $query = <String, List<String>>{
    if (customerId != null) 'customerId': [customerId],
    if (includeValues != null) 'includeValues': [includeValues.toString()],
    if (limit != null) 'limit': [limit.toString()],
    if (nameQuery != null) 'name': [nameQuery],
    if (position != null) 'position': [position],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/apikeys',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ApiKeys.fromJson(response);
}