listAnomalyDetectors method
Returns a paginated list of anomaly detectors for a workspace with optional filtering by alias.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter workspaceId :
The identifier of the workspace containing the anomaly detectors to list.
Parameter alias :
Filters the results to anomaly detectors with the specified alias.
Parameter maxResults :
The maximum number of results to return in a single call. Valid range is 1
to 1000.
Parameter nextToken :
The pagination token to continue retrieving results.
Implementation
Future<ListAnomalyDetectorsResponse> listAnomalyDetectors({
required String workspaceId,
String? alias,
int? maxResults,
String? nextToken,
}) async {
final $query = <String, List<String>>{
if (alias != null) 'alias': [alias],
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/workspaces/${Uri.encodeComponent(workspaceId)}/anomalydetectors',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListAnomalyDetectorsResponse.fromJson(response);
}