getDetectorVersion method

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

Gets a particular detector version.

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

Parameter detectorId : The detector ID.

Parameter detectorVersionId : The detector version ID.

Implementation

Future<GetDetectorVersionResult> getDetectorVersion({
  required String detectorId,
  required String detectorVersionId,
}) async {
  ArgumentError.checkNotNull(detectorId, 'detectorId');
  _s.validateStringLength(
    'detectorId',
    detectorId,
    1,
    64,
    isRequired: true,
  );
  ArgumentError.checkNotNull(detectorVersionId, 'detectorVersionId');
  _s.validateStringLength(
    'detectorVersionId',
    detectorVersionId,
    1,
    5,
    isRequired: true,
  );
  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);
}