def list_datastores(
self,
*,
config_overrides: Optional[MedicalImagingClientConfig] = 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.
"""
def _handler(
req: "OperationRequest[capo_medical_imaging.types.list_datastores_request.ListDatastoresRequest]",
) -> OperationResponse[
"capo_medical_imaging.types.list_datastores_response.ListDatastoresResponse"
]:
import capo_medical_imaging._operations.ahi_gateway_service.list_datastores
output, http_response = (
capo_medical_imaging._operations.ahi_gateway_service.list_datastores.list_datastores(
req.options, req.input
)
)
return OperationResponse(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 = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output