Skip to content

update_data_accessor

update_data_accessor(
    application_id: ApplicationId,
    data_accessor_id: DataAccessorId,
    action_configurations: ActionConfigurationList,
    *,
    config_overrides: Optional[QBusinessClientConfig] = None,
    authentication_detail: Optional[DataAccessorAuthenticationDetail] = None,
    display_name: Optional[DataAccessorName] = None,
) -> UpdateDataAccessorResponse

Updates an existing data accessor. This operation allows modifying the action configurations (the allowed actions and associated filters) and the display name of the data accessor. It does not allow changing the IAM role associated with the data accessor or other core properties of the data accessor.

Parameters:

  • application_id (ApplicationId) –

    The unique identifier of the Amazon Q Business application.

  • data_accessor_id (DataAccessorId) –

    The unique identifier of the data accessor to update.

  • action_configurations (ActionConfigurationList) –

    The updated list of action configurations specifying the allowed actions and any associated filters.

  • authentication_detail (Optional[DataAccessorAuthenticationDetail], default: None ) –

    The updated authentication configuration details for the data accessor. This specifies how the ISV will authenticate when accessing data through this data accessor.

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

    The updated friendly name for the data accessor.

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_accessor(
    self,
    application_id: "capo_qbusiness.types.application_id.ApplicationId",
    data_accessor_id: "capo_qbusiness.types.data_accessor_id.DataAccessorId",
    action_configurations: "capo_qbusiness.types.action_configuration_list.ActionConfigurationList",
    *,
    config_overrides: Optional[QBusinessClientConfig] = None,
    authentication_detail: Optional[
        "capo_qbusiness.types.data_accessor_authentication_detail.DataAccessorAuthenticationDetail"
    ] = None,
    display_name: Optional[
        "capo_qbusiness.types.data_accessor_name.DataAccessorName"
    ] = None,
) -> (
    "capo_qbusiness.types.update_data_accessor_response.UpdateDataAccessorResponse"
):
    """<p>Updates an existing data accessor. This operation allows modifying the action configurations (the allowed actions and associated filters) and the display name of the data accessor. It does not allow changing the IAM role associated with the data accessor or other core properties of the data accessor.</p>

    Args:
        application_id: <p>The unique identifier of the Amazon Q Business application.</p>
        data_accessor_id: <p>The unique identifier of the data accessor to update.</p>
        action_configurations: <p>The updated list of action configurations specifying the allowed actions and any associated filters.</p>
        authentication_detail: <p>The updated authentication configuration details for the data accessor. This specifies how the ISV will authenticate when accessing data through this data accessor.</p>
        display_name: <p>The updated friendly name for the data accessor.</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_accessor_request.UpdateDataAccessorRequest]",
    ) -> OperationResponse[
        "capo_qbusiness.types.update_data_accessor_response.UpdateDataAccessorResponse"
    ]:
        import capo_qbusiness._operations.expert_q.update_data_accessor

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

    def _redact_input(
        input_: "capo_qbusiness.types.update_data_accessor_request.UpdateDataAccessorRequest",
    ) -> dict[str, Any]:
        import capo_qbusiness.types.update_data_accessor_request

        return capo_qbusiness.types.update_data_accessor_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("UpdateDataAccessor", redact_input=_redact_input),
    )
    input_: capo_qbusiness.types.update_data_accessor_request.UpdateDataAccessorRequest = {
        "application_id": application_id,
        "data_accessor_id": data_accessor_id,
        "action_configurations": action_configurations,
    }
    if authentication_detail is not None:
        input_["authentication_detail"] = authentication_detail
    if display_name is not None:
        input_["display_name"] = display_name

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