Skip to content

list_q_apps

list_q_apps(
    instance_id: InstanceId,
    *,
    config_overrides: Optional[QAppsClientConfig] = None,
    limit: Optional[PageLimit] = None,
    next_token: Optional[PaginationToken] = None,
) -> ListQAppsOutput

Lists the Amazon Q Apps owned by or associated with the user either because they created it or because they used it from the library in the past. The user identity is extracted from the credentials used to invoke this operation..

Parameters:

  • instance_id (InstanceId) –

    The unique identifier of the Amazon Q Business application environment instance.

  • limit (Optional[PageLimit], default: None ) –

    The maximum number of Q Apps to return in the response.

  • next_token (Optional[PaginationToken], default: None ) –

    The token to request the next page of results.

Raises:

  • AccessDeniedException –

    The client is not authorized to perform the requested operation.

  • InternalServerException –

    An internal service error occurred while processing the request.

  • ThrottlingException –

    The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.

  • UnauthorizedException –

    The client is not authenticated or authorized to perform the requested operation.

  • ValidationException –

    The input failed to satisfy the constraints specified by the service.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Examples:

List at most 3 Amazon Q Apps in an Q Business application

>>> client.list_q_apps(instance_id='0b95c9c4-89cc-4aa8-9aae-aa91cbec699f', limit=3)
Retrieve the next page of Amazon Q Apps
>>> client.list_q_apps(instance_id='0b95c9c4-89cc-4aa8-9aae-aa91cbec699f', limit=3, next_token='bXlzdGVyaW91c1BhZ2luYXRpb25Ub2tlbg==')
Source code in docs_src/capo_qapps/_services/q_apps.py
def list_q_apps(
    self,
    instance_id: "capo_qapps.types.instance_id.InstanceId",
    *,
    config_overrides: Optional[QAppsClientConfig] = None,
    limit: Optional["capo_qapps.types.page_limit.PageLimit"] = None,
    next_token: Optional[
        "capo_qapps.types.pagination_token.PaginationToken"
    ] = None,
) -> "capo_qapps.types.list_q_apps_output.ListQAppsOutput":
    """<p>Lists the Amazon Q Apps owned by or associated with the user either because they created it or because they used it from the library in the past. The user identity is extracted from the credentials used to invoke this operation..</p>

    Args:
        instance_id: <p>The unique identifier of the Amazon Q Business application environment instance.</p>
        limit: <p>The maximum number of Q Apps to return in the response.</p>
        next_token: <p>The token to request the next page of results.</p>

    Raises:
        capo_qapps.errors.access_denied_exception.AccessDeniedException: <p>The client is not authorized to perform the requested operation.</p>
        capo_qapps.errors.internal_server_exception.InternalServerException: <p>An internal service error occurred while processing the request.</p>
        capo_qapps.errors.throttling_exception.ThrottlingException: <p>The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.</p>
        capo_qapps.errors.unauthorized_exception.UnauthorizedException: <p>The client is not authenticated or authorized to perform the requested operation.</p>
        capo_qapps.errors.validation_exception.ValidationException: <p>The input failed to satisfy the constraints specified by the service.</p>
        capo_qapps.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        List at most 3 Amazon Q Apps in an Q Business application

        >>> client.list_q_apps(instance_id='0b95c9c4-89cc-4aa8-9aae-aa91cbec699f', limit=3)
        Retrieve the next page of Amazon Q Apps

        >>> client.list_q_apps(instance_id='0b95c9c4-89cc-4aa8-9aae-aa91cbec699f', limit=3, next_token='bXlzdGVyaW91c1BhZ2luYXRpb25Ub2tlbg==')
    """

    def _handler(
        req: "OperationRequest[capo_qapps.types.list_q_apps_input.ListQAppsInput]",
    ) -> OperationResponse["capo_qapps.types.list_q_apps_output.ListQAppsOutput"]:
        import capo_qapps._operations.q_apps_service.list_q_apps

        output, http_response = (
            capo_qapps._operations.q_apps_service.list_q_apps.list_q_apps(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListQApps")
    )
    input_: capo_qapps.types.list_q_apps_input.ListQAppsInput = {
        "instance_id": instance_id
    }
    if limit is not None:
        input_["limit"] = limit
    if next_token is not None:
        input_["next_token"] = next_token

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