Skip to content

update_index

update_index(
    application_id: ApplicationId,
    index_id: IndexId,
    *,
    config_overrides: Optional[QBusinessClientConfig] = None,
    display_name: Optional[ApplicationName] = None,
    description: Optional[Description] = None,
    capacity_configuration: Optional[IndexCapacityConfiguration] = None,
    document_attribute_configurations: Optional[DocumentAttributeConfigurations] = None,
) -> UpdateIndexResponse

Updates an Amazon Q Business index.

Parameters:

  • application_id (ApplicationId) –

    The identifier of the Amazon Q Business application connected to the index.

  • index_id (IndexId) –

    The identifier of the Amazon Q Business index.

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

    The name of the Amazon Q Business index.

  • description (Optional[Description], default: None ) –

    The description of the Amazon Q Business index.

  • capacity_configuration (Optional[IndexCapacityConfiguration], default: None ) –

    The storage capacity units you want to provision for your Amazon Q Business index. You can add and remove capacity to fit your usage needs.

  • document_attribute_configurations (Optional[DocumentAttributeConfigurations], default: None ) –

    Configuration information for document metadata or fields. Document metadata are fields or attributes associated with your documents. For example, the company department name associated with each document. For more information, see Understanding document attributes.

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 update_index(
    self,
    application_id: "capo_qbusiness.types.application_id.ApplicationId",
    index_id: "capo_qbusiness.types.index_id.IndexId",
    *,
    config_overrides: Optional[QBusinessClientConfig] = None,
    display_name: Optional[
        "capo_qbusiness.types.application_name.ApplicationName"
    ] = None,
    description: Optional["capo_qbusiness.types.description.Description"] = None,
    capacity_configuration: Optional[
        "capo_qbusiness.types.index_capacity_configuration.IndexCapacityConfiguration"
    ] = None,
    document_attribute_configurations: Optional[
        "capo_qbusiness.types.document_attribute_configurations.DocumentAttributeConfigurations"
    ] = None,
) -> "capo_qbusiness.types.update_index_response.UpdateIndexResponse":
    """<p>Updates an Amazon Q Business index.</p>

    Args:
        application_id: <p>The identifier of the Amazon Q Business application connected to the index.</p>
        index_id: <p>The identifier of the Amazon Q Business index.</p>
        display_name: <p>The name of the Amazon Q Business index.</p>
        description: <p>The description of the Amazon Q Business index.</p>
        capacity_configuration: <p>The storage capacity units you want to provision for your Amazon Q Business index. You can add and remove capacity to fit your usage needs.</p>
        document_attribute_configurations: <p>Configuration information for document metadata or fields. Document metadata are fields or attributes associated with your documents. For example, the company department name associated with each document. For more information, see <a href="https://docs.aws.amazon.com/amazonq/latest/business-use-dg/doc-attributes-types.html#doc-attributes">Understanding document attributes</a>.</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.update_index_request.UpdateIndexRequest]",
    ) -> OperationResponse[
        "capo_qbusiness.types.update_index_response.UpdateIndexResponse"
    ]:
        import capo_qbusiness._operations.expert_q.update_index

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateIndex")
    )
    input_: capo_qbusiness.types.update_index_request.UpdateIndexRequest = {
        "application_id": application_id,
        "index_id": index_id,
    }
    if display_name is not None:
        input_["display_name"] = display_name
    if description is not None:
        input_["description"] = description
    if capacity_configuration is not None:
        input_["capacity_configuration"] = capacity_configuration
    if document_attribute_configurations is not None:
        input_["document_attribute_configurations"] = (
            document_attribute_configurations
        )

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