describeDetector method

Future<DescribeDetectorResponse> describeDetector({
  1. required String detectorModelName,
  2. String? keyValue,
})

Returns information about the specified detector (instance).

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

Parameter detectorModelName : The name of the detector model whose detectors (instances) you want information about.

Parameter keyValue : A filter used to limit results to detectors (instances) created because of the given key ID.

Implementation

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