getAnomalyMonitors method
Retrieves the cost anomaly monitor definitions for your account. You can filter using a list of cost anomaly monitor Amazon Resource Names (ARNs).
May throw InvalidNextTokenException.
May throw LimitExceededException.
May throw UnknownMonitorException.
Parameter maxResults :
The number of entries that a paginated response contains.
Parameter monitorArnList :
A list of cost anomaly monitor ARNs.
Parameter nextPageToken :
The token to retrieve the next set of results. Amazon Web Services
provides the token when the response from a previous call has more results
than the maximum page size.
Implementation
Future<GetAnomalyMonitorsResponse> getAnomalyMonitors({
int? maxResults,
List<String>? monitorArnList,
String? nextPageToken,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSInsightsIndexService.GetAnomalyMonitors'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (maxResults != null) 'MaxResults': maxResults,
if (monitorArnList != null) 'MonitorArnList': monitorArnList,
if (nextPageToken != null) 'NextPageToken': nextPageToken,
},
);
return GetAnomalyMonitorsResponse.fromJson(jsonResponse.body);
}