Skip to content

search_image_sets

search_image_sets(
    datastore_id: DatastoreId,
    *,
    config_overrides: Optional[MedicalImagingClientConfig] = None,
    search_criteria: Optional[SearchCriteria] = None,
    max_results: Optional[int] = None,
    next_token: Optional[NextToken] = None,
) -> SearchImageSetsResponse

Search image sets based on defined input attributes.

SearchImageSets accepts a single search query parameter and returns a paginated response of all image sets that have the matching criteria. All date range queries must be input as (lowerBound, upperBound).

By default, SearchImageSets uses the updatedAt field for sorting in descending order from newest to oldest.

Parameters:

  • datastore_id (DatastoreId) –

    The identifier of the data store where the image sets reside.

  • search_criteria (Optional[SearchCriteria], default: None ) –

    The search criteria that filters by applying a maximum of 1 item to SearchByAttribute.

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

    The maximum number of results that can be returned in a search.

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

    The token used for pagination of results returned in the response. Use the token returned from the previous request to continue results where the previous request ended.

Raises:

Source code in docs_src/capo_medical_imaging/_services/medical_imaging.py
def search_image_sets(
    self,
    datastore_id: "capo_medical_imaging.types.datastore_id.DatastoreId",
    *,
    config_overrides: Optional[MedicalImagingClientConfig] = None,
    search_criteria: Optional[
        "capo_medical_imaging.types.search_criteria.SearchCriteria"
    ] = None,
    max_results: Optional[int] = None,
    next_token: Optional["capo_medical_imaging.types.next_token.NextToken"] = None,
) -> (
    "capo_medical_imaging.types.search_image_sets_response.SearchImageSetsResponse"
):
    """<p>Search image sets based on defined input attributes.</p> <note> <p> <code>SearchImageSets</code> accepts a single search query parameter and returns a paginated response of all image sets that have the matching criteria. All date range queries must be input as <code>(lowerBound, upperBound)</code>.</p> <p>By default, <code>SearchImageSets</code> uses the <code>updatedAt</code> field for sorting in descending order from newest to oldest.</p> </note>

    Args:
        datastore_id: <p>The identifier of the data store where the image sets reside.</p>
        search_criteria: <p>The search criteria that filters by applying a maximum of 1 item to <code>SearchByAttribute</code>.</p>
        max_results: <p>The maximum number of results that can be returned in a search.</p>
        next_token: <p>The token used for pagination of results returned in the response. Use the token returned from the previous request to continue results where the previous request ended.</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.conflict_exception.ConflictException: <p>Updating or deleting a resource can cause an inconsistent state.</p>
        capo_medical_imaging.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred during processing of the request.</p>
        capo_medical_imaging.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request references a resource which does not exist.</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.search_image_sets_request.SearchImageSetsRequest]",
    ) -> OperationResponse[
        "capo_medical_imaging.types.search_image_sets_response.SearchImageSetsResponse"
    ]:
        import capo_medical_imaging._operations.ahi_gateway_service.search_image_sets

        output, http_response = (
            capo_medical_imaging._operations.ahi_gateway_service.search_image_sets.search_image_sets(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_medical_imaging.types.search_image_sets_request.SearchImageSetsRequest",
    ) -> dict[str, Any]:
        import capo_medical_imaging.types.search_image_sets_request

        return (
            capo_medical_imaging.types.search_image_sets_request.redact_sensitive(
                input_
            )
        )

    def _redact_output(
        output: "capo_medical_imaging.types.search_image_sets_response.SearchImageSetsResponse",
    ) -> dict[str, Any]:
        import capo_medical_imaging.types.search_image_sets_response

        return (
            capo_medical_imaging.types.search_image_sets_response.redact_sensitive(
                output
            )
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "SearchImageSets",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_medical_imaging.types.search_image_sets_request.SearchImageSetsRequest = {
        "datastore_id": datastore_id
    }
    if search_criteria is not None:
        input_["search_criteria"] = search_criteria
    if max_results is not None:
        input_["max_results"] = max_results
    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