Skip to content

update_data_source

update_data_source(
    application_id: ApplicationId,
    index_id: IndexId,
    data_source_id: DataSourceId,
    *,
    config_overrides: Optional[QBusinessClientConfig] = None,
    display_name: Optional[DataSourceName] = None,
    configuration: Optional[DataSourceConfiguration] = None,
    vpc_configuration: Optional[DataSourceVpcConfiguration] = None,
    description: Optional[Description] = None,
    sync_schedule: Optional[SyncSchedule] = None,
    role_arn: Optional[RoleArn] = None,
    document_enrichment_configuration: Optional[DocumentEnrichmentConfiguration] = None,
    media_extraction_configuration: Optional[MediaExtractionConfiguration] = None,
) -> UpdateDataSourceResponse

Updates an existing Amazon Q Business data source connector.

Parameters:

  • application_id (ApplicationId) –

    The identifier of the Amazon Q Business application the data source is attached to.

  • index_id (IndexId) –

    The identifier of the index attached to the data source connector.

  • data_source_id (DataSourceId) –

    The identifier of the data source connector.

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

    A name of the data source connector.

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

    The description of the data source connector.

  • sync_schedule (Optional[SyncSchedule], default: None ) –

    The chosen update frequency for your data source.

  • role_arn (Optional[RoleArn], default: None ) –

    The Amazon Resource Name (ARN) of an IAM role with permission to access the data source and required resources.

  • media_extraction_configuration (Optional[MediaExtractionConfiguration], default: None ) –

    The configuration for extracting information from media in documents for your data source.

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/q_business.py
def update_data_source(
    self,
    application_id: "capo_qbusiness.types.application_id.ApplicationId",
    index_id: "capo_qbusiness.types.index_id.IndexId",
    data_source_id: "capo_qbusiness.types.data_source_id.DataSourceId",
    *,
    config_overrides: Optional[QBusinessClientConfig] = None,
    display_name: Optional[
        "capo_qbusiness.types.data_source_name.DataSourceName"
    ] = None,
    configuration: Optional[
        "capo_qbusiness.types.data_source_configuration.DataSourceConfiguration"
    ] = None,
    vpc_configuration: Optional[
        "capo_qbusiness.types.data_source_vpc_configuration.DataSourceVpcConfiguration"
    ] = None,
    description: Optional["capo_qbusiness.types.description.Description"] = None,
    sync_schedule: Optional[
        "capo_qbusiness.types.sync_schedule.SyncSchedule"
    ] = None,
    role_arn: Optional["capo_qbusiness.types.role_arn.RoleArn"] = None,
    document_enrichment_configuration: Optional[
        "capo_qbusiness.types.document_enrichment_configuration.DocumentEnrichmentConfiguration"
    ] = None,
    media_extraction_configuration: Optional[
        "capo_qbusiness.types.media_extraction_configuration.MediaExtractionConfiguration"
    ] = None,
) -> "capo_qbusiness.types.update_data_source_response.UpdateDataSourceResponse":
    """<p>Updates an existing Amazon Q Business data source connector.</p>

    Args:
        application_id: <p> The identifier of the Amazon Q Business application the data source is attached to.</p>
        index_id: <p>The identifier of the index attached to the data source connector.</p>
        data_source_id: <p>The identifier of the data source connector.</p>
        display_name: <p>A name of the data source connector.</p>
        description: <p>The description of the data source connector.</p>
        sync_schedule: <p>The chosen update frequency for your data source.</p>
        role_arn: <p>The Amazon Resource Name (ARN) of an IAM role with permission to access the data source and required resources.</p>
        media_extraction_configuration: <p>The configuration for extracting information from media in documents for your data source.</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.
    """

    def _handler(
        req: "OperationRequest[capo_qbusiness.types.update_data_source_request.UpdateDataSourceRequest]",
    ) -> OperationResponse[
        "capo_qbusiness.types.update_data_source_response.UpdateDataSourceResponse"
    ]:
        import capo_qbusiness._operations.expert_q.update_data_source

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateDataSource")
    )
    input_: capo_qbusiness.types.update_data_source_request.UpdateDataSourceRequest = {
        "application_id": application_id,
        "index_id": index_id,
        "data_source_id": data_source_id,
    }
    if display_name is not None:
        input_["display_name"] = display_name
    if configuration is not None:
        input_["configuration"] = configuration
    if vpc_configuration is not None:
        input_["vpc_configuration"] = vpc_configuration
    if description is not None:
        input_["description"] = description
    if sync_schedule is not None:
        input_["sync_schedule"] = sync_schedule
    if role_arn is not None:
        input_["role_arn"] = role_arn
    if document_enrichment_configuration is not None:
        input_["document_enrichment_configuration"] = (
            document_enrichment_configuration
        )
    if media_extraction_configuration is not None:
        input_["media_extraction_configuration"] = media_extraction_configuration

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