Skip to content

create_chat_response_configuration

create_chat_response_configuration(
    application_id: ApplicationId,
    display_name: DisplayName,
    response_configurations: ResponseConfigurations,
    *,
    config_overrides: Optional[QBusinessClientConfig] = None,
    client_token: Optional[String] = None,
    tags: Optional[Tags] = None,
) -> CreateChatResponseConfigurationResponse

Creates a new chat response configuration for an Amazon Q Business application. This operation establishes a set of parameters that define how the system generates and formats responses to user queries in chat interactions.

Parameters:

  • application_id (ApplicationId) –

    The unique identifier of the Amazon Q Business application for which to create the new chat response configuration.

  • display_name (DisplayName) –

    A human-readable name for the new chat response configuration, making it easier to identify and manage among multiple configurations.

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

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

  • response_configurations (ResponseConfigurations) –

    A collection of response configuration settings that define how Amazon Q Business will generate and format responses to user queries in chat interactions.

  • tags (Optional[Tags], default: None ) –

    A list of key-value pairs to apply as tags to the new chat response configuration, enabling categorization and management of resources across Amazon Web Services services.

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.

  • ServiceQuotaExceededException –

    You have exceeded the set limits for your Amazon Q Business service.

  • 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/q_business.py
def create_chat_response_configuration(
    self,
    application_id: "capo_qbusiness.types.application_id.ApplicationId",
    display_name: "capo_qbusiness.types.display_name.DisplayName",
    response_configurations: "capo_qbusiness.types.response_configurations.ResponseConfigurations",
    *,
    config_overrides: Optional[QBusinessClientConfig] = None,
    client_token: Optional["capo_qbusiness.types.string.String"] = None,
    tags: Optional["capo_qbusiness.types.tags.Tags"] = None,
) -> "capo_qbusiness.types.create_chat_response_configuration_response.CreateChatResponseConfigurationResponse":
    """<p>Creates a new chat response configuration for an Amazon Q Business application. This operation establishes a set of parameters that define how the system generates and formats responses to user queries in chat interactions.</p>

    Args:
        application_id: <p>The unique identifier of the Amazon Q Business application for which to create the new chat response configuration.</p>
        display_name: <p>A human-readable name for the new chat response configuration, making it easier to identify and manage among multiple configurations.</p>
        client_token: <p>A unique, case-sensitive identifier to ensure idempotency of the request. This helps prevent the same configuration from being created multiple times if retries occur.</p>
        response_configurations: <p>A collection of response configuration settings that define how Amazon Q Business will generate and format responses to user queries in chat interactions.</p>
        tags: <p>A list of key-value pairs to apply as tags to the new chat response configuration, enabling categorization and management of resources across Amazon Web Services services.</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.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>You have exceeded the set limits for your Amazon Q Business service. </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.
    """

    def _handler(
        req: "OperationRequest[capo_qbusiness.types.create_chat_response_configuration_request.CreateChatResponseConfigurationRequest]",
    ) -> OperationResponse[
        "capo_qbusiness.types.create_chat_response_configuration_response.CreateChatResponseConfigurationResponse"
    ]:
        import capo_qbusiness._operations.expert_q.create_chat_response_configuration

        output, http_response = (
            capo_qbusiness._operations.expert_q.create_chat_response_configuration.create_chat_response_configuration(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateChatResponseConfiguration")
    )
    input_: capo_qbusiness.types.create_chat_response_configuration_request.CreateChatResponseConfigurationRequest = {
        "application_id": application_id,
        "display_name": display_name,
        "response_configurations": response_configurations,
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if tags is not None:
        input_["tags"] = tags

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