Skip to content

update_retriever async

update_retriever(
    application_id: ApplicationId,
    retriever_id: RetrieverId,
    *,
    config_overrides: Optional[AsyncQBusinessClientConfig] = None,
    configuration: Optional[RetrieverConfiguration] = None,
    display_name: Optional[RetrieverName] = None,
    role_arn: Optional[RoleArn] = None,
) -> UpdateRetrieverResponse

Updates the retriever used for your Amazon Q Business application.

Parameters:

  • application_id (ApplicationId) –

    The identifier of your Amazon Q Business application.

  • retriever_id (RetrieverId) –

    The identifier of your retriever.

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

    The name of your retriever.

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

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

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/async_q_business.py
async def update_retriever(
    self,
    application_id: "capo_qbusiness.types.application_id.ApplicationId",
    retriever_id: "capo_qbusiness.types.retriever_id.RetrieverId",
    *,
    config_overrides: Optional[AsyncQBusinessClientConfig] = None,
    configuration: Optional[
        "capo_qbusiness.types.retriever_configuration.RetrieverConfiguration"
    ] = None,
    display_name: Optional[
        "capo_qbusiness.types.retriever_name.RetrieverName"
    ] = None,
    role_arn: Optional["capo_qbusiness.types.role_arn.RoleArn"] = None,
) -> "capo_qbusiness.types.update_retriever_response.UpdateRetrieverResponse":
    """<p>Updates the retriever used for your Amazon Q Business application.</p>

    Args:
        application_id: <p>The identifier of your Amazon Q Business application.</p>
        retriever_id: <p>The identifier of your retriever.</p>
        display_name: <p>The name of your retriever.</p>
        role_arn: <p>The Amazon Resource Name (ARN) of an IAM role with permission to access the retriever and required resources. </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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_qbusiness.types.update_retriever_request.UpdateRetrieverRequest]",
    ) -> AsyncOperationResponse[
        "capo_qbusiness.types.update_retriever_response.UpdateRetrieverResponse"
    ]:
        import capo_qbusiness._operations.expert_q.update_retriever

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateRetriever")
    )
    input_: capo_qbusiness.types.update_retriever_request.UpdateRetrieverRequest = {
        "application_id": application_id,
        "retriever_id": retriever_id,
    }
    if configuration is not None:
        input_["configuration"] = configuration
    if display_name is not None:
        input_["display_name"] = display_name
    if role_arn is not None:
        input_["role_arn"] = role_arn

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