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 LimitExceededException. May throw UnknownMonitorException. May throw InvalidNextTokenException.
Parameter maxResults
:
The number of entries a paginated response contains.
Parameter monitorArnList
:
A list of cost anomaly monitor ARNs.
Parameter nextPageToken
:
The token to retrieve the next set of results. AWS 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 {
_s.validateStringLength(
'nextPageToken',
nextPageToken,
0,
8192,
);
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);
}