getDetectorVersion method

Future<GetDetectorVersionResult> getDetectorVersion({
  1. required String detectorId,
  2. required String detectorVersionId,
})

Gets a particular detector version.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter detectorId : The detector ID.

Parameter detectorVersionId : The detector version ID.

Implementation

Future<GetDetectorVersionResult> getDetectorVersion({
  required String detectorId,
  required String detectorVersionId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSHawksNestServiceFacade.GetDetectorVersion'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'detectorId': detectorId,
      'detectorVersionId': detectorVersionId,
    },
  );

  return GetDetectorVersionResult.fromJson(jsonResponse.body);
}