Interface GeoPlacesAsyncClient
- All Superinterfaces:
AutoCloseable,AwsClient,SdkAutoCloseable,SdkClient
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final StringValue for looking up the service's metadata from theServiceMetadataProvider.static final String -
Method Summary
Modifier and TypeMethodDescriptiondefault CompletableFuture<AutocompleteResponse> autocomplete(Consumer<AutocompleteRequest.Builder> autocompleteRequest) Autocompletecompletes potential places and addresses as the user types, based on the partial input.default CompletableFuture<AutocompleteResponse> autocomplete(AutocompleteRequest autocompleteRequest) Autocompletecompletes potential places and addresses as the user types, based on the partial input.static GeoPlacesAsyncClientBuilderbuilder()Create a builder that can be used to configure and create aGeoPlacesAsyncClient.static GeoPlacesAsyncClientcreate()Create aGeoPlacesAsyncClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.default CompletableFuture<GeocodeResponse> geocode(Consumer<GeocodeRequest.Builder> geocodeRequest) Geocodeconverts a textual address or place into geographic coordinates.default CompletableFuture<GeocodeResponse> geocode(GeocodeRequest geocodeRequest) Geocodeconverts a textual address or place into geographic coordinates.default CompletableFuture<GetPlaceResponse> getPlace(Consumer<GetPlaceRequest.Builder> getPlaceRequest) GetPlacefinds a place by its unique ID.default CompletableFuture<GetPlaceResponse> getPlace(GetPlaceRequest getPlaceRequest) GetPlacefinds a place by its unique ID.default CompletableFuture<ReverseGeocodeResponse> reverseGeocode(Consumer<ReverseGeocodeRequest.Builder> reverseGeocodeRequest) ReverseGeocodeconverts geographic coordinates into a human-readable address or place.default CompletableFuture<ReverseGeocodeResponse> reverseGeocode(ReverseGeocodeRequest reverseGeocodeRequest) ReverseGeocodeconverts geographic coordinates into a human-readable address or place.default CompletableFuture<SearchNearbyResponse> searchNearby(Consumer<SearchNearbyRequest.Builder> searchNearbyRequest) SearchNearbyqueries for points of interest within a radius from a central coordinates, returning place results with optional filters such as categories, business chains, food types and more.default CompletableFuture<SearchNearbyResponse> searchNearby(SearchNearbyRequest searchNearbyRequest) SearchNearbyqueries for points of interest within a radius from a central coordinates, returning place results with optional filters such as categories, business chains, food types and more.default CompletableFuture<SearchTextResponse> searchText(Consumer<SearchTextRequest.Builder> searchTextRequest) SearchTextsearches for geocode and place information.default CompletableFuture<SearchTextResponse> searchText(SearchTextRequest searchTextRequest) SearchTextsearches for geocode and place information.The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationdefault CompletableFuture<SuggestResponse> suggest(Consumer<SuggestRequest.Builder> suggestRequest) Suggestprovides intelligent predictions or recommendations based on the user's input or context, such as relevant places, points of interest, query terms or search category.default CompletableFuture<SuggestResponse> suggest(SuggestRequest suggestRequest) Suggestprovides intelligent predictions or recommendations based on the user's input or context, such as relevant places, points of interest, query terms or search category.Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
closeMethods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
Field Details
-
SERVICE_NAME
- See Also:
-
SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider.- See Also:
-
-
Method Details
-
autocomplete
default CompletableFuture<AutocompleteResponse> autocomplete(AutocompleteRequest autocompleteRequest) Autocompletecompletes potential places and addresses as the user types, based on the partial input. The API enhances the efficiency and accuracy of address by completing query based on a few entered keystrokes. It helps you by completing partial queries with valid address completion. Also, the API supports the filtering of results based on geographic location, country, or specific place types, and can be tailored using optional parameters like language and political views.- 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 invokeThrowable.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) Autocompletecompletes potential places and addresses as the user types, based on the partial input. The API enhances the efficiency and accuracy of address by completing query based on a few entered keystrokes. It helps you by completing partial queries with valid address completion. Also, the API supports the filtering of results based on geographic location, country, or specific place types, and can be tailored using optional parameters like language and political views.
This is a convenience which creates an instance of the
AutocompleteRequest.Builderavoiding the need to create one manually viaAutocompleteRequest.builder()- Parameters:
autocompleteRequest- AConsumerthat will call methods onAutocompleteRequest.Builderto 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 invokeThrowable.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
Geocodeconverts a textual address or place into geographic coordinates. You can obtain geographic coordinates, address component, and other related information. It supports flexible queries, including free-form text or structured queries with components like street names, postal codes, and regions. The Geocode API can also provide additional features such as time zone information and the inclusion of political views.- 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 invokeThrowable.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
Geocodeconverts a textual address or place into geographic coordinates. You can obtain geographic coordinates, address component, and other related information. It supports flexible queries, including free-form text or structured queries with components like street names, postal codes, and regions. The Geocode API can also provide additional features such as time zone information and the inclusion of political views.
This is a convenience which creates an instance of the
GeocodeRequest.Builderavoiding the need to create one manually viaGeocodeRequest.builder()- Parameters:
geocodeRequest- AConsumerthat will call methods onGeocodeRequest.Builderto 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 invokeThrowable.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
GetPlacefinds a place by its unique ID. APlaceIdis 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 invokeThrowable.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(Consumer<GetPlaceRequest.Builder> getPlaceRequest) GetPlacefinds a place by its unique ID. APlaceIdis returned by other place operations.
This is a convenience which creates an instance of the
GetPlaceRequest.Builderavoiding the need to create one manually viaGetPlaceRequest.builder()- Parameters:
getPlaceRequest- AConsumerthat will call methods onGetPlaceRequest.Builderto 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 invokeThrowable.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) ReverseGeocodeconverts geographic coordinates into a human-readable address or place. You can obtain address component, and other related information such as place type, category, street information. The Reverse Geocode API supports filtering to on place type so that you can refine result based on your need. Also, The Reverse Geocode API can also provide additional features such as time zone information and the inclusion of political views.- 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 invokeThrowable.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) ReverseGeocodeconverts geographic coordinates into a human-readable address or place. You can obtain address component, and other related information such as place type, category, street information. The Reverse Geocode API supports filtering to on place type so that you can refine result based on your need. Also, The Reverse Geocode API can also provide additional features such as time zone information and the inclusion of political views.
This is a convenience which creates an instance of the
ReverseGeocodeRequest.Builderavoiding the need to create one manually viaReverseGeocodeRequest.builder()- Parameters:
reverseGeocodeRequest- AConsumerthat will call methods onReverseGeocodeRequest.Builderto 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 invokeThrowable.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) SearchNearbyqueries for points of interest within a radius from a central coordinates, returning place results with optional filters such as categories, business chains, food types and more. The API returns details such as a place name, address, phone, category, food type, contact, opening hours. Also, the API can return phonemes, time zones and more based on requested parameters.- 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 invokeThrowable.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) SearchNearbyqueries for points of interest within a radius from a central coordinates, returning place results with optional filters such as categories, business chains, food types and more. The API returns details such as a place name, address, phone, category, food type, contact, opening hours. Also, the API can return phonemes, time zones and more based on requested parameters.
This is a convenience which creates an instance of the
SearchNearbyRequest.Builderavoiding the need to create one manually viaSearchNearbyRequest.builder()- Parameters:
searchNearbyRequest- AConsumerthat will call methods onSearchNearbyRequest.Builderto 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 invokeThrowable.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
SearchTextsearches for geocode and place information. You can then complete a follow-up query suggested from theSuggestAPI 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 invokeThrowable.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) SearchTextsearches for geocode and place information. You can then complete a follow-up query suggested from theSuggestAPI via a query id.
This is a convenience which creates an instance of the
SearchTextRequest.Builderavoiding the need to create one manually viaSearchTextRequest.builder()- Parameters:
searchTextRequest- AConsumerthat will call methods onSearchTextRequest.Builderto 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 invokeThrowable.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
Suggestprovides intelligent predictions or recommendations based on the user's input or context, such as relevant places, points of interest, query terms or search category. It is designed to help users find places or point of interests candidates or identify a follow on query based on incomplete or misspelled queries. It returns a list of possible matches or refinements that can be used to formulate a more accurate query. Users can select the most appropriate suggestion and use it for further searching. The API provides options for filtering results by location and other attributes, and allows for additional features like phonemes and timezones. The response includes refined query terms and detailed place information.- 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 invokeThrowable.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
Suggestprovides intelligent predictions or recommendations based on the user's input or context, such as relevant places, points of interest, query terms or search category. It is designed to help users find places or point of interests candidates or identify a follow on query based on incomplete or misspelled queries. It returns a list of possible matches or refinements that can be used to formulate a more accurate query. Users can select the most appropriate suggestion and use it for further searching. The API provides options for filtering results by location and other attributes, and allows for additional features like phonemes and timezones. The response includes refined query terms and detailed place information.
This is a convenience which creates an instance of the
SuggestRequest.Builderavoiding the need to create one manually viaSuggestRequest.builder()- Parameters:
suggestRequest- AConsumerthat will call methods onSuggestRequest.Builderto 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 invokeThrowable.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
Description copied from interface:SdkClientThe SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient- Returns:
- SdkServiceClientConfiguration
-
create
Create aGeoPlacesAsyncClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider. -
builder
Create a builder that can be used to configure and create aGeoPlacesAsyncClient.
-