describeDetectorModel method

Future<DescribeDetectorModelResponse> describeDetectorModel({
  1. required String detectorModelName,
  2. String? detectorModelVersion,
})

Describes a detector model. If the version parameter is not specified, information about the latest version is returned.

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

Parameter detectorModelName : The name of the detector model.

Parameter detectorModelVersion : The version of the detector model.

Implementation

Future<DescribeDetectorModelResponse> describeDetectorModel({
  required String detectorModelName,
  String? detectorModelVersion,
}) async {
  ArgumentError.checkNotNull(detectorModelName, 'detectorModelName');
  _s.validateStringLength(
    'detectorModelName',
    detectorModelName,
    1,
    128,
    isRequired: true,
  );
  _s.validateStringLength(
    'detectorModelVersion',
    detectorModelVersion,
    1,
    128,
  );
  final $query = <String, List<String>>{
    if (detectorModelVersion != null) 'version': [detectorModelVersion],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/detector-models/${Uri.encodeComponent(detectorModelName)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return DescribeDetectorModelResponse.fromJson(response);
}