listBots method

Future<ListBotsResponse> listBots({
  1. required String accountId,
  2. int? maxResults,
  3. String? nextToken,
})

Lists the bots associated with the administrator's Amazon Chime Enterprise account ID.

May throw ServiceUnavailableException. May throw ServiceFailureException. May throw ForbiddenException. May throw UnauthorizedClientException. May throw BadRequestException. May throw NotFoundException. May throw ThrottledClientException.

Parameter accountId : The Amazon Chime account ID.

Parameter maxResults : The maximum number of results to return in a single call. The default is 10.

Parameter nextToken : The token to use to retrieve the next page of results.

Implementation

Future<ListBotsResponse> listBots({
  required String accountId,
  int? maxResults,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(accountId, 'accountId');
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    99,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'max-results': [maxResults.toString()],
    if (nextToken != null) 'next-token': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/accounts/${Uri.encodeComponent(accountId)}/bots',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListBotsResponse.fromJson(response);
}