listCollectors method

Future<ListCollectorsResponse> listCollectors({
  1. int? maxResults,
  2. String? nextToken,
})

Retrieves a list of all the installed collectors.

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

Parameter maxResults : The maximum number of items to include in the response. The maximum value is 100.

Parameter nextToken : The token from a previous call that you use to retrieve the next set of results. For example, if a previous call to this action returned 100 items, but you set maxResults to 10. You'll receive a set of 10 results along with a token. You then use the returned token to retrieve the next set of 10.

Implementation

Future<ListCollectorsResponse> listCollectors({
  int? maxResults,
  String? nextToken,
}) async {
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/list-collectors',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListCollectorsResponse.fromJson(response);
}