updateAssistantAIAgent method

Future<UpdateAssistantAIAgentResponse> updateAssistantAIAgent({
  1. required AIAgentType aiAgentType,
  2. required String assistantId,
  3. required AIAgentConfigurationData configuration,
  4. String? orchestratorUseCase,
})

Updates the AI Agent that is set for use by default on an Amazon Q in Connect Assistant.

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

Parameter aiAgentType : The type of the AI Agent being updated for use by default on the Amazon Q in Connect Assistant.

Parameter assistantId : The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

Parameter configuration : The configuration of the AI Agent being updated for use by default on the Amazon Q in Connect Assistant.

Parameter orchestratorUseCase : The orchestrator use case for the AI Agent being added.

Implementation

Future<UpdateAssistantAIAgentResponse> updateAssistantAIAgent({
  required AIAgentType aiAgentType,
  required String assistantId,
  required AIAgentConfigurationData configuration,
  String? orchestratorUseCase,
}) async {
  final $payload = <String, dynamic>{
    'aiAgentType': aiAgentType.value,
    'configuration': configuration,
    if (orchestratorUseCase != null)
      'orchestratorUseCase': orchestratorUseCase,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/assistants/${Uri.encodeComponent(assistantId)}/aiagentConfiguration',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateAssistantAIAgentResponse.fromJson(response);
}