Skip to content

search_raster_data_collection

search_raster_data_collection(
    arn: DataCollectionArn,
    raster_data_collection_query: RasterDataCollectionQueryWithBandFilterInput,
    *,
    config_overrides: Optional[SageMakerGeospatialClientConfig] = None,
    next_token: Optional[NextToken] = None,
) -> SearchRasterDataCollectionOutput

Allows you run image query on a specific raster data collection to get a list of the satellite imagery matching the selected filters.

Parameters:

Raises:

Source code in docs_src/capo_sagemaker_geospatial/_services/sage_maker_geospatial.py
def search_raster_data_collection(
    self,
    arn: "capo_sagemaker_geospatial.types.data_collection_arn.DataCollectionArn",
    raster_data_collection_query: "capo_sagemaker_geospatial.types.raster_data_collection_query_with_band_filter_input.RasterDataCollectionQueryWithBandFilterInput",
    *,
    config_overrides: Optional[SageMakerGeospatialClientConfig] = None,
    next_token: Optional[
        "capo_sagemaker_geospatial.types.next_token.NextToken"
    ] = None,
) -> "capo_sagemaker_geospatial.types.search_raster_data_collection_output.SearchRasterDataCollectionOutput":
    """<p>Allows you run image query on a specific raster data collection to get a list of the satellite imagery matching the selected filters.</p>

    Args:
        arn: <p>The Amazon Resource Name (ARN) of the raster data collection.</p>
        raster_data_collection_query: <p>RasterDataCollectionQuery consisting of <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_geospatial_AreaOfInterest.html">AreaOfInterest(AOI)</a>, <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_geospatial_PropertyFilter.html">PropertyFilters</a> and <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_geospatial_TimeRangeFilterInput.html">TimeRangeFilterInput</a> used in <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_geospatial_SearchRasterDataCollection.html">SearchRasterDataCollection</a>.</p>
        next_token: <p>If the previous response was truncated, you receive this token. Use it in your next request to receive the next set of results.</p>

    Raises:
        capo_sagemaker_geospatial.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_sagemaker_geospatial.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception, or failure.</p>
        capo_sagemaker_geospatial.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request references a resource which does not exist.</p>
        capo_sagemaker_geospatial.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_sagemaker_geospatial.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_sagemaker_geospatial.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_sagemaker_geospatial.types.search_raster_data_collection_input.SearchRasterDataCollectionInput]",
    ) -> OperationResponse[
        "capo_sagemaker_geospatial.types.search_raster_data_collection_output.SearchRasterDataCollectionOutput"
    ]:
        import capo_sagemaker_geospatial._operations.sage_maker_geospatial.search_raster_data_collection

        output, http_response = (
            capo_sagemaker_geospatial._operations.sage_maker_geospatial.search_raster_data_collection.search_raster_data_collection(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_sagemaker_geospatial.types.search_raster_data_collection_input.SearchRasterDataCollectionInput",
    ) -> dict[str, Any]:
        import capo_sagemaker_geospatial.types.search_raster_data_collection_input

        return capo_sagemaker_geospatial.types.search_raster_data_collection_input.redact_sensitive(
            input_
        )

    def _redact_output(
        output: "capo_sagemaker_geospatial.types.search_raster_data_collection_output.SearchRasterDataCollectionOutput",
    ) -> dict[str, Any]:
        import capo_sagemaker_geospatial.types.search_raster_data_collection_output

        return capo_sagemaker_geospatial.types.search_raster_data_collection_output.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "SearchRasterDataCollection",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_sagemaker_geospatial.types.search_raster_data_collection_input.SearchRasterDataCollectionInput = {
        "arn": arn,
        "raster_data_collection_query": raster_data_collection_query,
    }
    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