Interface GeoPlacesAsyncClient

All Superinterfaces:
AutoCloseable, AwsClient, SdkAutoCloseable, SdkClient

@Generated("software.amazon.awssdk:codegen") @ThreadSafe public interface GeoPlacesAsyncClient extends AwsClient
Service client for accessing Amazon Location Service Places V2 asynchronously. This can be created using the static builder() method.The asynchronous client performs non-blocking I/O when configured with any SdkAsyncHttpClient supported in the SDK. However, full non-blocking is not guaranteed as the async client may perform blocking calls in some cases such as credentials retrieval and endpoint discovery as part of the async API call.

The Places API enables powerful location search and geocoding capabilities for your applications, offering global coverage with rich, detailed information. Key features include:

  • Forward and reverse geocoding for addresses and coordinates

  • Comprehensive place searches with detailed information, including:

    • Business names and addresses

    • Contact information

    • Hours of operation

    • POI (Points of Interest) categories

    • Food types for restaurants

    • Chain affiliation for relevant businesses

  • Global data coverage with a wide range of POI categories

  • Regular data updates to ensure accuracy and relevance

  • Field Details

  • Method Details

    • autocomplete

      default CompletableFuture<AutocompleteResponse> autocomplete(AutocompleteRequest autocompleteRequest)

      The autocomplete operation speeds up and increases the accuracy of entering addresses by providing a list of address candidates matching a partially entered address. Results are sorted from most to least matching. Filtering and biasing can be used to increase the relevance of the results if additional search context is known

      Parameters:
      autocompleteRequest -
      Returns:
      A Java Future containing the result of the Autocomplete operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InternalServerException The request processing has failed because of an unknown error, exception or failure.
      • AccessDeniedException You don't have sufficient access to perform this action.
      • ValidationException The input fails to satisfy the constraints specified by an AWS service.
      • ThrottlingException The request was denied due to request throttling.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • GeoPlacesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • autocomplete

      default CompletableFuture<AutocompleteResponse> autocomplete(Consumer<AutocompleteRequest.Builder> autocompleteRequest)

      The autocomplete operation speeds up and increases the accuracy of entering addresses by providing a list of address candidates matching a partially entered address. Results are sorted from most to least matching. Filtering and biasing can be used to increase the relevance of the results if additional search context is known


      This is a convenience which creates an instance of the AutocompleteRequest.Builder avoiding the need to create one manually via AutocompleteRequest.builder()

      Parameters:
      autocompleteRequest - A Consumer that will call methods on AutocompleteRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the Autocomplete operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InternalServerException The request processing has failed because of an unknown error, exception or failure.
      • AccessDeniedException You don't have sufficient access to perform this action.
      • ValidationException The input fails to satisfy the constraints specified by an AWS service.
      • ThrottlingException The request was denied due to request throttling.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • GeoPlacesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • geocode

      default CompletableFuture<GeocodeResponse> geocode(GeocodeRequest geocodeRequest)

      The Geocode action allows you to obtain coordinates, addresses, and other information about places.

      Parameters:
      geocodeRequest -
      Returns:
      A Java Future containing the result of the Geocode operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InternalServerException The request processing has failed because of an unknown error, exception or failure.
      • AccessDeniedException You don't have sufficient access to perform this action.
      • ValidationException The input fails to satisfy the constraints specified by an AWS service.
      • ThrottlingException The request was denied due to request throttling.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • GeoPlacesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • geocode

      The Geocode action allows you to obtain coordinates, addresses, and other information about places.


      This is a convenience which creates an instance of the GeocodeRequest.Builder avoiding the need to create one manually via GeocodeRequest.builder()

      Parameters:
      geocodeRequest - A Consumer that will call methods on GeocodeRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the Geocode operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InternalServerException The request processing has failed because of an unknown error, exception or failure.
      • AccessDeniedException You don't have sufficient access to perform this action.
      • ValidationException The input fails to satisfy the constraints specified by an AWS service.
      • ThrottlingException The request was denied due to request throttling.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • GeoPlacesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getPlace

      default CompletableFuture<GetPlaceResponse> getPlace(GetPlaceRequest getPlaceRequest)

      Finds a place by its unique ID. A PlaceId is returned by other place operations.

      Parameters:
      getPlaceRequest -
      Returns:
      A Java Future containing the result of the GetPlace operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InternalServerException The request processing has failed because of an unknown error, exception or failure.
      • AccessDeniedException You don't have sufficient access to perform this action.
      • ValidationException The input fails to satisfy the constraints specified by an AWS service.
      • ThrottlingException The request was denied due to request throttling.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • GeoPlacesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getPlace

      Finds a place by its unique ID. A PlaceId is returned by other place operations.


      This is a convenience which creates an instance of the GetPlaceRequest.Builder avoiding the need to create one manually via GetPlaceRequest.builder()

      Parameters:
      getPlaceRequest - A Consumer that will call methods on GetPlaceRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the GetPlace operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InternalServerException The request processing has failed because of an unknown error, exception or failure.
      • AccessDeniedException You don't have sufficient access to perform this action.
      • ValidationException The input fails to satisfy the constraints specified by an AWS service.
      • ThrottlingException The request was denied due to request throttling.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • GeoPlacesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • reverseGeocode

      default CompletableFuture<ReverseGeocodeResponse> reverseGeocode(ReverseGeocodeRequest reverseGeocodeRequest)

      The ReverseGeocode operation allows you to retrieve addresses and place information from coordinates.

      Parameters:
      reverseGeocodeRequest -
      Returns:
      A Java Future containing the result of the ReverseGeocode operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InternalServerException The request processing has failed because of an unknown error, exception or failure.
      • AccessDeniedException You don't have sufficient access to perform this action.
      • ValidationException The input fails to satisfy the constraints specified by an AWS service.
      • ThrottlingException The request was denied due to request throttling.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • GeoPlacesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • reverseGeocode

      default CompletableFuture<ReverseGeocodeResponse> reverseGeocode(Consumer<ReverseGeocodeRequest.Builder> reverseGeocodeRequest)

      The ReverseGeocode operation allows you to retrieve addresses and place information from coordinates.


      This is a convenience which creates an instance of the ReverseGeocodeRequest.Builder avoiding the need to create one manually via ReverseGeocodeRequest.builder()

      Parameters:
      reverseGeocodeRequest - A Consumer that will call methods on ReverseGeocodeRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the ReverseGeocode operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InternalServerException The request processing has failed because of an unknown error, exception or failure.
      • AccessDeniedException You don't have sufficient access to perform this action.
      • ValidationException The input fails to satisfy the constraints specified by an AWS service.
      • ThrottlingException The request was denied due to request throttling.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • GeoPlacesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • searchNearby

      default CompletableFuture<SearchNearbyResponse> searchNearby(SearchNearbyRequest searchNearbyRequest)

      Search nearby a specified location.

      Parameters:
      searchNearbyRequest -
      Returns:
      A Java Future containing the result of the SearchNearby operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InternalServerException The request processing has failed because of an unknown error, exception or failure.
      • AccessDeniedException You don't have sufficient access to perform this action.
      • ValidationException The input fails to satisfy the constraints specified by an AWS service.
      • ThrottlingException The request was denied due to request throttling.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • GeoPlacesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • searchNearby

      default CompletableFuture<SearchNearbyResponse> searchNearby(Consumer<SearchNearbyRequest.Builder> searchNearbyRequest)

      Search nearby a specified location.


      This is a convenience which creates an instance of the SearchNearbyRequest.Builder avoiding the need to create one manually via SearchNearbyRequest.builder()

      Parameters:
      searchNearbyRequest - A Consumer that will call methods on SearchNearbyRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the SearchNearby operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InternalServerException The request processing has failed because of an unknown error, exception or failure.
      • AccessDeniedException You don't have sufficient access to perform this action.
      • ValidationException The input fails to satisfy the constraints specified by an AWS service.
      • ThrottlingException The request was denied due to request throttling.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • GeoPlacesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • searchText

      default CompletableFuture<SearchTextResponse> searchText(SearchTextRequest searchTextRequest)

      Use the SearchText operation to search for geocode and place information. You can then complete a follow-up query suggested from the Suggest API via a query id.

      Parameters:
      searchTextRequest -
      Returns:
      A Java Future containing the result of the SearchText operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InternalServerException The request processing has failed because of an unknown error, exception or failure.
      • AccessDeniedException You don't have sufficient access to perform this action.
      • ValidationException The input fails to satisfy the constraints specified by an AWS service.
      • ThrottlingException The request was denied due to request throttling.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • GeoPlacesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • searchText

      default CompletableFuture<SearchTextResponse> searchText(Consumer<SearchTextRequest.Builder> searchTextRequest)

      Use the SearchText operation to search for geocode and place information. You can then complete a follow-up query suggested from the Suggest API via a query id.


      This is a convenience which creates an instance of the SearchTextRequest.Builder avoiding the need to create one manually via SearchTextRequest.builder()

      Parameters:
      searchTextRequest - A Consumer that will call methods on SearchTextRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the SearchText operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InternalServerException The request processing has failed because of an unknown error, exception or failure.
      • AccessDeniedException You don't have sufficient access to perform this action.
      • ValidationException The input fails to satisfy the constraints specified by an AWS service.
      • ThrottlingException The request was denied due to request throttling.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • GeoPlacesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • suggest

      default CompletableFuture<SuggestResponse> suggest(SuggestRequest suggestRequest)

      The Suggest operation finds addresses or place candidates based on incomplete or misspelled queries. You then select the best query to submit based on the returned results.

      Parameters:
      suggestRequest -
      Returns:
      A Java Future containing the result of the Suggest operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InternalServerException The request processing has failed because of an unknown error, exception or failure.
      • AccessDeniedException You don't have sufficient access to perform this action.
      • ValidationException The input fails to satisfy the constraints specified by an AWS service.
      • ThrottlingException The request was denied due to request throttling.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • GeoPlacesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • suggest

      The Suggest operation finds addresses or place candidates based on incomplete or misspelled queries. You then select the best query to submit based on the returned results.


      This is a convenience which creates an instance of the SuggestRequest.Builder avoiding the need to create one manually via SuggestRequest.builder()

      Parameters:
      suggestRequest - A Consumer that will call methods on SuggestRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the Suggest operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InternalServerException The request processing has failed because of an unknown error, exception or failure.
      • AccessDeniedException You don't have sufficient access to perform this action.
      • ValidationException The input fails to satisfy the constraints specified by an AWS service.
      • ThrottlingException The request was denied due to request throttling.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • GeoPlacesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • serviceClientConfiguration

      default GeoPlacesServiceClientConfiguration serviceClientConfiguration()
      Description copied from interface: SdkClient
      The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration
      Specified by:
      serviceClientConfiguration in interface AwsClient
      Specified by:
      serviceClientConfiguration in interface SdkClient
      Returns:
      SdkServiceClientConfiguration
    • create

      static GeoPlacesAsyncClient create()
      Create a GeoPlacesAsyncClient with the region loaded from the DefaultAwsRegionProviderChain and credentials loaded from the DefaultCredentialsProvider.
    • builder

      static GeoPlacesAsyncClientBuilder builder()
      Create a builder that can be used to configure and create a GeoPlacesAsyncClient.