getDetector method

Future<GetDetectorResponse> getDetector({
  1. required String detectorId,
})

Retrieves a GuardDuty detector specified by the detectorId.

There might be regional differences because some data sources might not be available in all the Amazon Web Services Regions where GuardDuty is presently supported. For more information, see Regions and endpoints.

May throw BadRequestException. May throw InternalServerErrorException.

Parameter detectorId : The unique ID of the detector that you want to get.

To find the detectorId in the current Region, see the Settings page in the GuardDuty console, or run the ListDetectors API.

Implementation

Future<GetDetectorResponse> getDetector({
  required String detectorId,
}) async {
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/detector/${Uri.encodeComponent(detectorId)}',
    exceptionFnMap: _exceptionFns,
  );
  return GetDetectorResponse.fromJson(response);
}