removeAssistantAIAgent method

Future<void> removeAssistantAIAgent({
  1. required AIAgentType aiAgentType,
  2. required String assistantId,
  3. String? orchestratorUseCase,
})

Removes 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 removed for use by default from 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 orchestratorUseCase : The orchestrator use case for the AI Agent being removed.

Implementation

Future<void> removeAssistantAIAgent({
  required AIAgentType aiAgentType,
  required String assistantId,
  String? orchestratorUseCase,
}) async {
  final $query = <String, List<String>>{
    'aiAgentType': [aiAgentType.value],
    if (orchestratorUseCase != null)
      'orchestratorUseCase': [orchestratorUseCase],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/assistants/${Uri.encodeComponent(assistantId)}/aiagentConfiguration',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
}