getAppMonitorData method

Future<GetAppMonitorDataResponse> getAppMonitorData({
  1. required String name,
  2. required TimeRange timeRange,
  3. List<QueryFilter>? filters,
  4. int? maxResults,
  5. String? nextToken,
})

Retrieves the raw performance events that RUM has collected from your web application, so that you can do your own processing or analysis of this data.

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

Parameter name : The name of the app monitor that collected the data that you want to retrieve.

Parameter timeRange : A structure that defines the time range that you want to retrieve results from.

Parameter filters : An array of structures that you can use to filter the results to those that match one or more sets of key-value pairs that you specify.

Parameter maxResults : The maximum number of results to return in one operation.

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

Implementation

Future<GetAppMonitorDataResponse> getAppMonitorData({
  required String name,
  required TimeRange timeRange,
  List<QueryFilter>? filters,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    0,
    100,
  );
  final $payload = <String, dynamic>{
    'TimeRange': timeRange,
    if (filters != null) 'Filters': filters,
    if (maxResults != null) 'MaxResults': maxResults,
    if (nextToken != null) 'NextToken': nextToken,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/appmonitor/${Uri.encodeComponent(name)}/data',
    exceptionFnMap: _exceptionFns,
  );
  return GetAppMonitorDataResponse.fromJson(response);
}