Skip to content

update_assistant_ai_agent

update_assistant_ai_agent(
    assistant_id: UuidOrArn,
    ai_agent_type: AIAgentType,
    configuration: AIAgentConfigurationData,
    *,
    config_overrides: Optional[QConnectClientConfig] = None,
    orchestrator_use_case: Optional[NonEmptyString] = None,
) -> UpdateAssistantAIAgentResponse

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

Parameters:

  • assistant_id (UuidOrArn) –

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

  • ai_agent_type (AIAgentType) –

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

  • configuration (AIAgentConfigurationData) –

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

  • orchestrator_use_case (Optional[NonEmptyString], default: None ) –

    The orchestrator use case for the AI Agent being added.

Raises:

Source code in docs_src/capo_qconnect/_services/q_connect.py
def update_assistant_ai_agent(
    self,
    assistant_id: "capo_qconnect.types.uuid_or_arn.UuidOrArn",
    ai_agent_type: "capo_qconnect.types.ai_agent_type.AIAgentType",
    configuration: "capo_qconnect.types.ai_agent_configuration_data.AIAgentConfigurationData",
    *,
    config_overrides: Optional[QConnectClientConfig] = None,
    orchestrator_use_case: Optional[
        "capo_qconnect.types.non_empty_string.NonEmptyString"
    ] = None,
) -> "capo_qconnect.types.update_assistant_ai_agent_response.UpdateAssistantAIAgentResponse":
    """<p>Updates the AI Agent that is set for use by default on an Amazon Q in Connect Assistant.</p>

    Args:
        assistant_id: <p>The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
        ai_agent_type: <p>The type of the AI Agent being updated for use by default on the Amazon Q in Connect Assistant.</p>
        configuration: <p>The configuration of the AI Agent being updated for use by default on the Amazon Q in Connect Assistant.</p>
        orchestrator_use_case: <p>The orchestrator use case for the AI Agent being added.</p>

    Raises:
        capo_qconnect.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_qconnect.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
        capo_qconnect.errors.throttling_exception.ThrottlingException: <p>The throttling limit has been exceeded.</p>
        capo_qconnect.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by a service.</p>
        capo_qconnect.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_qconnect.types.update_assistant_ai_agent_request.UpdateAssistantAIAgentRequest]",
    ) -> OperationResponse[
        "capo_qconnect.types.update_assistant_ai_agent_response.UpdateAssistantAIAgentResponse"
    ]:
        import capo_qconnect._operations.wisdom_service.update_assistant_ai_agent

        output, http_response = (
            capo_qconnect._operations.wisdom_service.update_assistant_ai_agent.update_assistant_ai_agent(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateAssistantAIAgent")
    )
    input_: capo_qconnect.types.update_assistant_ai_agent_request.UpdateAssistantAIAgentRequest = {
        "assistant_id": assistant_id,
        "ai_agent_type": ai_agent_type,
        "configuration": configuration,
    }
    if orchestrator_use_case is not None:
        input_["orchestrator_use_case"] = orchestrator_use_case

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output