startBotAnalyzer method

Future<StartBotAnalyzerResponse> startBotAnalyzer({
  1. required AnalysisScope analysisScope,
  2. required String botId,
  3. String? botVersion,
  4. String? localeId,
})

Initiates an asynchronous analysis of your bot configuration using AI-powered analysis to identify potential issues and recommend improvements based on AWS best practices.

The analysis examines your bot's configuration, including intents, utterances, slots, and conversation flows, to provide actionable recommendations for optimization.

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

Parameter analysisScope : The scope of analysis to perform. Currently only BotLocale scope is supported.

Valid Values: BotLocale

Parameter botId : The unique identifier of the bot to analyze.

Parameter botVersion : The version of the bot to analyze. Defaults to DRAFT if not specified.

Parameter localeId : The locale identifier for the bot locale to analyze. Required when analysisScope is BotLocale.

Implementation

Future<StartBotAnalyzerResponse> startBotAnalyzer({
  required AnalysisScope analysisScope,
  required String botId,
  String? botVersion,
  String? localeId,
}) async {
  final $payload = <String, dynamic>{
    'analysisScope': analysisScope.value,
    if (botVersion != null) 'botVersion': botVersion,
    if (localeId != null) 'localeId': localeId,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/bots/${Uri.encodeComponent(botId)}/botanalyzer',
    exceptionFnMap: _exceptionFns,
  );
  return StartBotAnalyzerResponse.fromJson(response);
}