Skip to content

create_data_accessor async

create_data_accessor(
    application_id: ApplicationId,
    principal: PrincipalRoleArn,
    action_configurations: ActionConfigurationList,
    display_name: DataAccessorName,
    *,
    config_overrides: Optional[AsyncQBusinessClientConfig] = None,
    client_token: Optional[ClientToken] = None,
    authentication_detail: Optional[DataAccessorAuthenticationDetail] = None,
    tags: Optional[Tags] = None,
) -> CreateDataAccessorResponse

Creates a new data accessor for an ISV to access data from a Amazon Q Business application. The data accessor is an entity that represents the ISV's access to the Amazon Q Business application's data. It includes the IAM role ARN for the ISV, a friendly name, and a set of action configurations that define the specific actions the ISV is allowed to perform and any associated data filters. When the data accessor is created, an IAM Identity Center application is also created to manage the ISV's identity and authentication for accessing the Amazon Q Business application.

Parameters:

  • application_id (ApplicationId) –

    The unique identifier of the Amazon Q Business application.

  • principal (PrincipalRoleArn) –

    The Amazon Resource Name (ARN) of the IAM role for the ISV that will be accessing the data.

  • action_configurations (ActionConfigurationList) –

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

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

    A unique, case-sensitive identifier you provide to ensure idempotency of the request.

  • display_name (DataAccessorName) –

    A friendly name for the data accessor.

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

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

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

    The tags to associate with 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.

  • 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 create_data_accessor(
    self,
    application_id: "capo_qbusiness.types.application_id.ApplicationId",
    principal: "capo_qbusiness.types.principal_role_arn.PrincipalRoleArn",
    action_configurations: "capo_qbusiness.types.action_configuration_list.ActionConfigurationList",
    display_name: "capo_qbusiness.types.data_accessor_name.DataAccessorName",
    *,
    config_overrides: Optional[AsyncQBusinessClientConfig] = None,
    client_token: Optional["capo_qbusiness.types.client_token.ClientToken"] = None,
    authentication_detail: Optional[
        "capo_qbusiness.types.data_accessor_authentication_detail.DataAccessorAuthenticationDetail"
    ] = None,
    tags: Optional["capo_qbusiness.types.tags.Tags"] = None,
) -> (
    "capo_qbusiness.types.create_data_accessor_response.CreateDataAccessorResponse"
):
    """<p>Creates a new data accessor for an ISV to access data from a Amazon Q Business application. The data accessor is an entity that represents the ISV's access to the Amazon Q Business application's data. It includes the IAM role ARN for the ISV, a friendly name, and a set of action configurations that define the specific actions the ISV is allowed to perform and any associated data filters. When the data accessor is created, an IAM Identity Center application is also created to manage the ISV's identity and authentication for accessing the Amazon Q Business application.</p>

    Args:
        application_id: <p>The unique identifier of the Amazon Q Business application.</p>
        principal: <p>The Amazon Resource Name (ARN) of the IAM role for the ISV that will be accessing the data.</p>
        action_configurations: <p>A list of action configurations specifying the allowed actions and any associated filters.</p>
        client_token: <p>A unique, case-sensitive identifier you provide to ensure idempotency of the request.</p>
        display_name: <p>A friendly name for the data accessor.</p>
        authentication_detail: <p>The authentication configuration details for the data accessor. This specifies how the ISV will authenticate when accessing data through this data accessor.</p>
        tags: <p>The tags to associate with 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.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.create_data_accessor_request.CreateDataAccessorRequest]",
    ) -> AsyncOperationResponse[
        "capo_qbusiness.types.create_data_accessor_response.CreateDataAccessorResponse"
    ]:
        import capo_qbusiness._operations.expert_q.create_data_accessor

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

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

        return capo_qbusiness.types.create_data_accessor_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("CreateDataAccessor", redact_input=_redact_input),
    )
    input_: capo_qbusiness.types.create_data_accessor_request.CreateDataAccessorRequest = {
        "application_id": application_id,
        "principal": principal,
        "action_configurations": action_configurations,
        "display_name": display_name,
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if authentication_detail is not None:
        input_["authentication_detail"] = authentication_detail
    if tags is not None:
        input_["tags"] = tags

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