describeAnomalyDetectors method
Lists the anomaly detection models that you have created in your account. You can list all models in your account or filter the results to only the models that are related to a certain namespace, metric name, or metric dimension.
May throw InvalidNextToken. May throw InternalServiceFault. May throw InvalidParameterValueException.
Parameter dimensions
:
Limits the results to only the anomaly detection models that are
associated with the specified metric dimensions. If there are multiple
metrics that have these dimensions and have anomaly detection models
associated, they're all returned.
Parameter maxResults
:
The maximum number of results to return in one operation. The maximum
value that you can specify is 100.
To retrieve the remaining results, make another call with the returned
NextToken
value.
Parameter metricName
:
Limits the results to only the anomaly detection models that are
associated with the specified metric name. If there are multiple metrics
with this name in different namespaces that have anomaly detection models,
they're all returned.
Parameter namespace
:
Limits the results to only the anomaly detection models that are
associated with the specified namespace.
Parameter nextToken
:
Use the token returned by the previous operation to request the next page
of results.
Implementation
Future<DescribeAnomalyDetectorsOutput> describeAnomalyDetectors({
List<Dimension>? dimensions,
int? maxResults,
String? metricName,
String? namespace,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
1152921504606846976,
);
_s.validateStringLength(
'metricName',
metricName,
1,
255,
);
_s.validateStringLength(
'namespace',
namespace,
1,
255,
);
final $request = <String, dynamic>{};
dimensions?.also((arg) => $request['Dimensions'] = arg);
maxResults?.also((arg) => $request['MaxResults'] = arg);
metricName?.also((arg) => $request['MetricName'] = arg);
namespace?.also((arg) => $request['Namespace'] = arg);
nextToken?.also((arg) => $request['NextToken'] = arg);
final $result = await _protocol.send(
$request,
action: 'DescribeAnomalyDetectors',
version: '2010-08-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['DescribeAnomalyDetectorsInput'],
shapes: shapes,
resultWrapper: 'DescribeAnomalyDetectorsResult',
);
return DescribeAnomalyDetectorsOutput.fromXml($result);
}