listRumMetricsDestinations method

Future<ListRumMetricsDestinationsResponse> listRumMetricsDestinations({
  1. required String appMonitorName,
  2. int? maxResults,
  3. String? nextToken,
})

Returns a list of destinations that you have created to receive RUM extended metrics, for the specified app monitor.

For more information about extended metrics, see AddRumMetrics.

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

Parameter appMonitorName : The name of the app monitor associated with the destinations that you want to retrieve.

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

To retrieve the remaining results, make another call with the returned NextToken value.

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

Implementation

Future<ListRumMetricsDestinationsResponse> listRumMetricsDestinations({
  required String appMonitorName,
  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: 'GET',
    requestUri:
        '/rummetrics/${Uri.encodeComponent(appMonitorName)}/metricsdestination',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListRumMetricsDestinationsResponse.fromJson(response);
}