describeBotAnalyzerRecommendation method

Future<DescribeBotAnalyzerRecommendationResponse> describeBotAnalyzerRecommendation({
  1. required String botAnalyzerRequestId,
  2. required String botId,
  3. int? maxResults,
  4. String? nextToken,
})

Retrieves the analysis results and recommendations for bot optimization. The analysis must be in Available status before recommendations can be retrieved.

Recommendations are returned with pagination support. Each recommendation includes the issue location, priority level, detailed description, and proposed fix.

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

Parameter botAnalyzerRequestId : The unique identifier of the analysis request.

Parameter botId : The unique identifier of the bot.

Parameter maxResults : The maximum number of recommendations to return in the response. The default is 5.

Parameter nextToken : If the response from a previous request was truncated, the nextToken value is used to retrieve the next page of recommendations.

Implementation

Future<DescribeBotAnalyzerRecommendationResponse>
    describeBotAnalyzerRecommendation({
  required String botAnalyzerRequestId,
  required String botId,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1000,
  );
  final $payload = <String, dynamic>{
    if (maxResults != null) 'maxResults': maxResults,
    if (nextToken != null) 'nextToken': nextToken,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/bots/${Uri.encodeComponent(botId)}/botanalyzer/describe/${Uri.encodeComponent(botAnalyzerRequestId)}',
    exceptionFnMap: _exceptionFns,
  );
  return DescribeBotAnalyzerRecommendationResponse.fromJson(response);
}