Skip to content

list_datastores async

list_datastores(
    *,
    config_overrides: Optional[AsyncMedicalImagingClientConfig] = None,
    datastore_status: Optional[DatastoreStatus] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[int] = None,
) -> ListDatastoresResponse

List data stores.

Parameters:

  • datastore_status (Optional[DatastoreStatus], default: None ) –

    The data store status.

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

    The pagination token used to request the list of data stores on the next page.

  • max_results (Optional[int], default: None ) –

    Valid Range: Minimum value of 1. Maximum value of 50.

Raises:

Source code in docs_src/capo_medical_imaging/_services/async_medical_imaging.py
async def list_datastores(
    self,
    *,
    config_overrides: Optional[AsyncMedicalImagingClientConfig] = None,
    datastore_status: Optional[
        "capo_medical_imaging.types.datastore_status.DatastoreStatus"
    ] = None,
    next_token: Optional["capo_medical_imaging.types.next_token.NextToken"] = None,
    max_results: Optional[int] = None,
) -> "capo_medical_imaging.types.list_datastores_response.ListDatastoresResponse":
    """<p>List data stores.</p>

    Args:
        datastore_status: <p>The data store status.</p>
        next_token: <p>The pagination token used to request the list of data stores on the next page.</p>
        max_results: <p>Valid Range: Minimum value of 1. Maximum value of 50.</p>

    Raises:
        capo_medical_imaging.errors.access_denied_exception.AccessDeniedException: <p>The user does not have sufficient access to perform this action.</p>
        capo_medical_imaging.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred during processing of the request.</p>
        capo_medical_imaging.errors.throttling_exception.ThrottlingException: <p>The request was denied due to throttling.</p>
        capo_medical_imaging.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints set by the service.</p>
        capo_medical_imaging.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_medical_imaging.types.list_datastores_request.ListDatastoresRequest]",
    ) -> AsyncOperationResponse[
        "capo_medical_imaging.types.list_datastores_response.ListDatastoresResponse"
    ]:
        import capo_medical_imaging._operations.ahi_gateway_service.list_datastores

        (
            output,
            http_response,
        ) = await capo_medical_imaging._operations.ahi_gateway_service.list_datastores.async_list_datastores(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListDatastores")
    )
    input_: capo_medical_imaging.types.list_datastores_request.ListDatastoresRequest = {}
    if datastore_status is not None:
        input_["datastore_status"] = datastore_status
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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