listAppMonitors method

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

Returns a list of the Amazon CloudWatch RUM app monitors in the account.

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

Parameter maxResults : The maximum number of results to return in one operation. The default is 50. The maximum that you can specify is 100.

Parameter nextToken : Use the token returned by the previous operation to request the next page of results.

Implementation

Future<ListAppMonitorsResponse> listAppMonitors({
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'POST',
    requestUri: '/appmonitors',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListAppMonitorsResponse.fromJson(response);
}