describeDetector method
Gets all versions for a specified detector.
May throw ValidationException. May throw ResourceNotFoundException. May throw InternalServerException. May throw ThrottlingException. May throw AccessDeniedException.
Parameter detectorId
:
The detector ID.
Parameter maxResults
:
The maximum number of results to return for the request.
Parameter nextToken
:
The next token from the previous response.
Implementation
Future<DescribeDetectorResult> describeDetector({
required String detectorId,
int? maxResults,
String? nextToken,
}) async {
ArgumentError.checkNotNull(detectorId, 'detectorId');
_s.validateStringLength(
'detectorId',
detectorId,
1,
64,
isRequired: true,
);
_s.validateNumRange(
'maxResults',
maxResults,
1000,
2500,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSHawksNestServiceFacade.DescribeDetector'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'detectorId': detectorId,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
},
);
return DescribeDetectorResult.fromJson(jsonResponse.body);
}