listDetectorModelVersions method

Future<ListDetectorModelVersionsResponse> listDetectorModelVersions({
  1. required String detectorModelName,
  2. int? maxResults,
  3. String? nextToken,
})

Lists all the versions of a detector model. Only the metadata associated with each detector model version is returned.

May throw InternalFailureException. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ServiceUnavailableException. May throw ThrottlingException.

Parameter detectorModelName : The name of the detector model whose versions are returned.

Parameter maxResults : The maximum number of results to be returned per request.

Parameter nextToken : The token that you can use to return the next set of results.

Implementation

Future<ListDetectorModelVersionsResponse> listDetectorModelVersions({
  required String detectorModelName,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    250,
  );
  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:
        '/detector-models/${Uri.encodeComponent(detectorModelName)}/versions',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListDetectorModelVersionsResponse.fromJson(response);
}