Skip to content

update_chat_response_configuration async

update_chat_response_configuration(
    application_id: ApplicationId,
    chat_response_configuration_id: ChatResponseConfigurationId,
    response_configurations: ResponseConfigurations,
    *,
    config_overrides: Optional[AsyncQBusinessClientConfig] = None,
    display_name: Optional[DisplayName] = None,
    client_token: Optional[String] = None,
) -> UpdateChatResponseConfigurationResponse

Updates an existing chat response configuration in an Amazon Q Business application. This operation allows administrators to modify configuration settings, display name, and response parameters to refine how the system generates responses.

Parameters:

  • application_id (ApplicationId) –

    The unique identifier of the Amazon Q Business application containing the chat response configuration to update.

  • chat_response_configuration_id (ChatResponseConfigurationId) –

    The unique identifier of the chat response configuration to update within the specified application.

  • display_name (Optional[DisplayName], default: None ) –

    The new human-readable name to assign to the chat response configuration, making it easier to identify among multiple configurations.

  • response_configurations (ResponseConfigurations) –

    The updated collection of response configuration settings that define how Amazon Q Business generates and formats responses to user queries.

  • client_token (Optional[String], default: None ) –

    A unique, case-sensitive identifier to ensure idempotency of the request. This helps prevent the same update from being processed multiple times if retries occur.

Raises:

  • AccessDeniedException –

    You don't have access to perform this action. Make sure you have the required permission policies and user accounts and try again.

  • ConflictException –

    You are trying to perform an action that conflicts with the current status of your resource. Fix any inconsistencies with your resources and try again.

  • InternalServerException –

    An issue occurred with the internal server used for your Amazon Q Business service. Wait some minutes and try again, or contact Support for help.

  • ResourceNotFoundException –

    The application or plugin resource you want to use doesn’t exist. Make sure you have provided the correct resource and try again.

  • ThrottlingException –

    The request was denied due to throttling. Reduce the number of requests and try again.

  • ValidationException –

    The input doesn't meet the constraints set by the Amazon Q Business service. Provide the correct input and try again.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_qbusiness/_services/async_q_business.py
async def update_chat_response_configuration(
    self,
    application_id: "capo_qbusiness.types.application_id.ApplicationId",
    chat_response_configuration_id: "capo_qbusiness.types.chat_response_configuration_id.ChatResponseConfigurationId",
    response_configurations: "capo_qbusiness.types.response_configurations.ResponseConfigurations",
    *,
    config_overrides: Optional[AsyncQBusinessClientConfig] = None,
    display_name: Optional["capo_qbusiness.types.display_name.DisplayName"] = None,
    client_token: Optional["capo_qbusiness.types.string.String"] = None,
) -> "capo_qbusiness.types.update_chat_response_configuration_response.UpdateChatResponseConfigurationResponse":
    """<p>Updates an existing chat response configuration in an Amazon Q Business application. This operation allows administrators to modify configuration settings, display name, and response parameters to refine how the system generates responses.</p>

    Args:
        application_id: <p>The unique identifier of the Amazon Q Business application containing the chat response configuration to update.</p>
        chat_response_configuration_id: <p>The unique identifier of the chat response configuration to update within the specified application.</p>
        display_name: <p>The new human-readable name to assign to the chat response configuration, making it easier to identify among multiple configurations.</p>
        response_configurations: <p>The updated collection of response configuration settings that define how Amazon Q Business generates and formats responses to user queries.</p>
        client_token: <p>A unique, case-sensitive identifier to ensure idempotency of the request. This helps prevent the same update from being processed multiple times if retries occur.</p>

    Raises:
        capo_qbusiness.errors.access_denied_exception.AccessDeniedException: <p> You don't have access to perform this action. Make sure you have the required permission policies and user accounts and try again.</p>
        capo_qbusiness.errors.conflict_exception.ConflictException: <p>You are trying to perform an action that conflicts with the current status of your resource. Fix any inconsistencies with your resources and try again.</p>
        capo_qbusiness.errors.internal_server_exception.InternalServerException: <p>An issue occurred with the internal server used for your Amazon Q Business service. Wait some minutes and try again, or contact <a href="http://aws.amazon.com/contact-us/">Support</a> for help.</p>
        capo_qbusiness.errors.resource_not_found_exception.ResourceNotFoundException: <p>The application or plugin resource you want to use doesn’t exist. Make sure you have provided the correct resource and try again.</p>
        capo_qbusiness.errors.throttling_exception.ThrottlingException: <p>The request was denied due to throttling. Reduce the number of requests and try again.</p>
        capo_qbusiness.errors.validation_exception.ValidationException: <p>The input doesn't meet the constraints set by the Amazon Q Business service. Provide the correct input and try again.</p>
        capo_qbusiness.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_qbusiness.types.update_chat_response_configuration_request.UpdateChatResponseConfigurationRequest]",
    ) -> AsyncOperationResponse[
        "capo_qbusiness.types.update_chat_response_configuration_response.UpdateChatResponseConfigurationResponse"
    ]:
        import capo_qbusiness._operations.expert_q.update_chat_response_configuration

        (
            output,
            http_response,
        ) = await capo_qbusiness._operations.expert_q.update_chat_response_configuration.async_update_chat_response_configuration(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateChatResponseConfiguration")
    )
    input_: capo_qbusiness.types.update_chat_response_configuration_request.UpdateChatResponseConfigurationRequest = {
        "application_id": application_id,
        "chat_response_configuration_id": chat_response_configuration_id,
        "response_configurations": response_configurations,
    }
    if display_name is not None:
        input_["display_name"] = display_name
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output