/*
* Copyright 2010-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package com.amazonaws.services.geo;
import java.util.*;
import com.amazonaws.*;
import com.amazonaws.auth.*;
import com.amazonaws.handlers.*;
import com.amazonaws.http.*;
import com.amazonaws.internal.*;
import com.amazonaws.metrics.*;
import com.amazonaws.transform.*;
import com.amazonaws.util.*;
import com.amazonaws.util.AWSRequestMetrics.Field;
import com.amazonaws.services.geo.model.*;
import com.amazonaws.services.geo.model.transform.*;
/**
* Client for accessing AWS Location service. All service calls made using this
* client are blocking, and will not return until the service call completes.
*
* "Suite of geospatial services including Maps, Places, Routes, Tracking, and Geofencing"
*
*/
public class AmazonLocationClient extends AmazonWebServiceClient implements AmazonLocation {
/** Provider for AWS credentials. */
private AWSCredentialsProvider awsCredentialsProvider;
/**
* List of exception unmarshallers for all AWS Location service exceptions.
*/
protected List jsonErrorUnmarshallers;
/**
* Constructs a new client to invoke service methods on AmazonLocation. A
* credentials provider chain will be used that searches for credentials in
* this order:
*
* - Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
* - Java System Properties - aws.accessKeyId and aws.secretKey
* - Instance profile credentials delivered through the Amazon EC2
* metadata service
*
*
* All service calls made using this new client object are blocking, and
* will not return until the service call completes.
*
* @see DefaultAWSCredentialsProviderChain
*/
@Deprecated
public AmazonLocationClient() {
this(new DefaultAWSCredentialsProviderChain(), new ClientConfiguration());
}
/**
* Constructs a new client to invoke service methods on AmazonLocation. A
* credentials provider chain will be used that searches for credentials in
* this order:
*
* - Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
* - Java System Properties - aws.accessKeyId and aws.secretKey
* - Instance profile credentials delivered through the Amazon EC2
* metadata service
*
*
* All service calls made using this new client object are blocking, and
* will not return until the service call completes.
*
* @param clientConfiguration The client configuration options controlling
* how this client connects to AmazonLocation (ex: proxy
* settings, retry counts, etc.).
* @see DefaultAWSCredentialsProviderChain
*/
@Deprecated
public AmazonLocationClient(ClientConfiguration clientConfiguration) {
this(new DefaultAWSCredentialsProviderChain(), clientConfiguration);
}
/**
* Constructs a new client to invoke service methods on AmazonLocation using
* the specified AWS account credentials.
*
* The client requests are authenticated using the {@link AWSCredentials}
* provided in this constructor. Static AWSCredentials can be passed for
* quick testing. However, it is strongly recommended to use Amazon Cognito
* vended temporary credentials for use in production. This can be achieved
* by using {@link AWSMobileClient}. Please see
* https://aws-amplify.github.io/docs/android/authentication for
* instructions on how to enable {@link AWSMobileClient}.
*
*
* AWSMobileClient.getInstance().initialize(getApplicationContext(), new Callback<UserStateDetails>() {
* @Override
* public void onResult(final UserStateDetails details) {
* AmazonLocationClient client = new AmazonLocationClient(AWSMobileClient.getInstance());
* }
*
* @Override
* public void onError(final Exception e) {
* e.printStackTrace();
* }
* });
*
*
* All service calls made using this new client object are blocking, and
* will not return until the service call completes.
*
* @param awsCredentials The AWS credentials (access key ID and secret key)
* to use when authenticating with AWS services.
*/
public AmazonLocationClient(AWSCredentials awsCredentials) {
this(awsCredentials, new ClientConfiguration());
}
/**
* Constructs a new client to invoke service methods on AmazonLocation using
* the specified AWS account credentials and client configuration options.
*
* The client requests are authenticated using the {@link AWSCredentials}
* provided in this constructor. Static AWSCredentials can be passed for
* quick testing. However, it is strongly recommended to use Amazon Cognito
* vended temporary credentials for use in production. This can be achieved
* by using {@link AWSMobileClient}. Please see
* https://aws-amplify.github.io/docs/android/authentication for
* instructions on how to enable {@link AWSMobileClient}.
*
*
* AWSMobileClient.getInstance().initialize(getApplicationContext(), new Callback<UserStateDetails>() {
* @Override
* public void onResult(final UserStateDetails details) {
* AmazonLocationClient client = new AmazonLocationClient(AWSMobileClient.getInstance());
* }
*
* @Override
* public void onError(final Exception e) {
* e.printStackTrace();
* }
* });
*
*
* All service calls made using this new client object are blocking, and
* will not return until the service call completes.
*
* @param awsCredentials The AWS credentials (access key ID and secret key)
* to use when authenticating with AWS services.
* @param clientConfiguration The client configuration options controlling
* how this client connects to AmazonLocation (ex: proxy
* settings, retry counts, etc.).
*/
public AmazonLocationClient(AWSCredentials awsCredentials,
ClientConfiguration clientConfiguration) {
this(new StaticCredentialsProvider(awsCredentials), clientConfiguration);
}
/**
* Constructs a new client to invoke service methods on AmazonLocation using
* the specified AWS account credentials provider.
*
* The client requests are authenticated using the {@link AWSCredentials}
* provided by the {@link AWSCredentialsProvider}. Static AWSCredentials can
* be passed for quick testing. However, it is strongly recommended to use
* Amazon Cognito vended temporary credentials for use in production. This
* can be achieved by using {@link AWSMobileClient}. Please see
* https://aws-amplify.github.io/docs/android/authentication for
* instructions on how to enable {@link AWSMobileClient}.
*
*
* AWSMobileClient.getInstance().initialize(getApplicationContext(), new Callback<UserStateDetails>() {
* @Override
* public void onResult(final UserStateDetails details) {
* AmazonLocationClient client = new AmazonLocationClient(AWSMobileClient.getInstance());
* }
*
* @Override
* public void onError(final Exception e) {
* e.printStackTrace();
* }
* });
*
*
* All service calls made using this new client object are blocking, and
* will not return until the service call completes.
*
* @param awsCredentialsProvider The AWS credentials provider which will
* provide credentials to authenticate requests with AWS
* services.
*/
public AmazonLocationClient(AWSCredentialsProvider awsCredentialsProvider) {
this(awsCredentialsProvider, new ClientConfiguration());
}
/**
* Constructs a new client to invoke service methods on AmazonLocation using
* the specified AWS account credentials provider and client configuration
* options.
*
* The client requests are authenticated using the {@link AWSCredentials}
* provided by the {@link AWSCredentialsProvider}. Static AWSCredentials can
* be passed for quick testing. However, it is strongly recommended to use
* Amazon Cognito vended temporary credentials for use in production. This
* can be achieved by using {@link AWSMobileClient}. Please see
* https://aws-amplify.github.io/docs/android/authentication for
* instructions on how to enable {@link AWSMobileClient}.
*
*
* AWSMobileClient.getInstance().initialize(getApplicationContext(), new Callback<UserStateDetails>() {
* @Override
* public void onResult(final UserStateDetails details) {
* AmazonLocationClient client = new AmazonLocationClient(AWSMobileClient.getInstance());
* }
*
* @Override
* public void onError(final Exception e) {
* e.printStackTrace();
* }
* });
*
*
* All service calls made using this new client object are blocking, and
* will not return until the service call completes.
*
* @param awsCredentialsProvider The AWS credentials provider which will
* provide credentials to authenticate requests with AWS
* services.
* @param clientConfiguration The client configuration options controlling
* how this client connects to AmazonLocation (ex: proxy
* settings, retry counts, etc.).
*/
public AmazonLocationClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration) {
this(awsCredentialsProvider, clientConfiguration, new UrlHttpClient(clientConfiguration));
}
/**
* Constructs a new client to invoke service methods on AmazonLocation using
* the specified AWS account credentials provider, client configuration
* options and request metric collector.
*
* All service calls made using this new client object are blocking, and
* will not return until the service call completes.
*
* @param awsCredentialsProvider The AWS credentials provider which will
* provide credentials to authenticate requests with AWS
* services.
* @param clientConfiguration The client configuration options controlling
* how this client connects to AmazonLocation (ex: proxy
* settings, retry counts, etc.).
* @param requestMetricCollector optional request metric collector
*/
@Deprecated
public AmazonLocationClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration,
RequestMetricCollector requestMetricCollector) {
super(adjustClientConfiguration(clientConfiguration), requestMetricCollector);
this.awsCredentialsProvider = awsCredentialsProvider;
init();
}
/**
* Constructs a new client to invoke service methods on AmazonLocation using
* the specified AWS account credentials provider, client configuration
* options and request metric collector.
*
* The client requests are authenticated using the {@link AWSCredentials}
* provided by the {@link AWSCredentialsProvider}. Static AWSCredentials can
* be passed for quick testing. However, it is strongly recommended to use
* Amazon Cognito vended temporary credentials for use in production. This
* can be achieved by using {@link AWSMobileClient}. Please see
* https://aws-amplify.github.io/docs/android/authentication for
* instructions on how to enable {@link AWSMobileClient}.
*
*
* AWSMobileClient.getInstance().initialize(getApplicationContext(), new Callback<UserStateDetails>() {
* @Override
* public void onResult(final UserStateDetails details) {
* AmazonLocationClient client = new AmazonLocationClient(AWSMobileClient.getInstance());
* }
*
* @Override
* public void onError(final Exception e) {
* e.printStackTrace();
* }
* });
*
*
* All service calls made using this new client object are blocking, and
* will not return until the service call completes.
*
* @param awsCredentialsProvider The AWS credentials provider which will
* provide credentials to authenticate requests with AWS
* services.
* @param clientConfiguration The client configuration options controlling
* how this client connects to AmazonLocation (ex: proxy
* settings, retry counts, etc.).
* @param httpClient A http client
*/
public AmazonLocationClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration, HttpClient httpClient) {
super(adjustClientConfiguration(clientConfiguration), httpClient);
this.awsCredentialsProvider = awsCredentialsProvider;
init();
}
private void init() {
jsonErrorUnmarshallers = new ArrayList();
jsonErrorUnmarshallers.add(new AccessDeniedExceptionUnmarshaller());
jsonErrorUnmarshallers.add(new ConflictExceptionUnmarshaller());
jsonErrorUnmarshallers.add(new InternalServerExceptionUnmarshaller());
jsonErrorUnmarshallers.add(new ResourceNotFoundExceptionUnmarshaller());
jsonErrorUnmarshallers.add(new ServiceQuotaExceededExceptionUnmarshaller());
jsonErrorUnmarshallers.add(new ThrottlingExceptionUnmarshaller());
jsonErrorUnmarshallers.add(new ValidationExceptionUnmarshaller());
jsonErrorUnmarshallers.add(new JsonErrorUnmarshaller());
// calling this.setEndPoint(...) will also modify the signer accordingly
setServiceNameIntern("geo");
this.setEndpoint("geo.us-east-1.amazonaws.com");
this.endpointPrefix = "geo";
HandlerChainFactory chainFactory = new HandlerChainFactory();
requestHandler2s.addAll(chainFactory.newRequestHandlerChain(
"/com/amazonaws/services/geo/request.handlers"));
requestHandler2s.addAll(chainFactory.newRequestHandler2Chain(
"/com/amazonaws/services/geo/request.handler2s"));
}
private static ClientConfiguration adjustClientConfiguration(ClientConfiguration orig) {
ClientConfiguration config = orig;
return config;
}
/**
*
* Creates an association between a geofence collection and a tracker
* resource. This allows the tracker resource to communicate location data
* to the linked geofence collection.
*
*
* You can associate up to five geofence collections to each tracker
* resource.
*
*
*
* Currently not supported — Cross-account configurations, such as creating
* associations between a tracker resource in one account and a geofence
* collection in another account.
*
*
*
* @param associateTrackerConsumerRequest
* @return associateTrackerConsumerResult The response from the
* AssociateTrackerConsumer service method, as returned by AWS
* Location service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws ConflictException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ServiceQuotaExceededException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public AssociateTrackerConsumerResult associateTrackerConsumer(
AssociateTrackerConsumerRequest associateTrackerConsumerRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(associateTrackerConsumerRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new AssociateTrackerConsumerRequestMarshaller()
.marshall(associateTrackerConsumerRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new AssociateTrackerConsumerResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Deletes the position history of one or more devices from a tracker
* resource.
*
*
* @param batchDeleteDevicePositionHistoryRequest
* @return batchDeleteDevicePositionHistoryResult The response from the
* BatchDeleteDevicePositionHistory service method, as returned by
* AWS Location service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public BatchDeleteDevicePositionHistoryResult batchDeleteDevicePositionHistory(
BatchDeleteDevicePositionHistoryRequest batchDeleteDevicePositionHistoryRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(batchDeleteDevicePositionHistoryRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new BatchDeleteDevicePositionHistoryRequestMarshaller()
.marshall(batchDeleteDevicePositionHistoryRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new BatchDeleteDevicePositionHistoryResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Deletes a batch of geofences from a geofence collection.
*
*
*
* This operation deletes the resource permanently.
*
*
*
* @param batchDeleteGeofenceRequest
* @return batchDeleteGeofenceResult The response from the
* BatchDeleteGeofence service method, as returned by AWS Location
* service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public BatchDeleteGeofenceResult batchDeleteGeofence(
BatchDeleteGeofenceRequest batchDeleteGeofenceRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(batchDeleteGeofenceRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new BatchDeleteGeofenceRequestMarshaller()
.marshall(batchDeleteGeofenceRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new BatchDeleteGeofenceResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Evaluates device positions against the geofence geometries from a given
* geofence collection.
*
*
* This operation always returns an empty response because geofences are
* asynchronously evaluated. The evaluation determines if the device has
* entered or exited a geofenced area, and then publishes one of the
* following events to Amazon EventBridge:
*
*
*
*
* The last geofence that a device was observed within is tracked for 30
* days after the most recent device position update.
*
*
*
* Geofence evaluation uses the given device position. It does not account
* for the optional Accuracy
of a
* DevicePositionUpdate
.
*
*
*
* The DeviceID
is used as a string to represent the device.
* You do not need to have a Tracker
associated with the
* DeviceID
.
*
*
*
* @param batchEvaluateGeofencesRequest
* @return batchEvaluateGeofencesResult The response from the
* BatchEvaluateGeofences service method, as returned by AWS
* Location service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public BatchEvaluateGeofencesResult batchEvaluateGeofences(
BatchEvaluateGeofencesRequest batchEvaluateGeofencesRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(batchEvaluateGeofencesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new BatchEvaluateGeofencesRequestMarshaller()
.marshall(batchEvaluateGeofencesRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new BatchEvaluateGeofencesResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Lists the latest device positions for requested devices.
*
*
* @param batchGetDevicePositionRequest
* @return batchGetDevicePositionResult The response from the
* BatchGetDevicePosition service method, as returned by AWS
* Location service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public BatchGetDevicePositionResult batchGetDevicePosition(
BatchGetDevicePositionRequest batchGetDevicePositionRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(batchGetDevicePositionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new BatchGetDevicePositionRequestMarshaller()
.marshall(batchGetDevicePositionRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new BatchGetDevicePositionResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* A batch request for storing geofence geometries into a given geofence
* collection, or updates the geometry of an existing geofence if a geofence
* ID is included in the request.
*
*
* @param batchPutGeofenceRequest
* @return batchPutGeofenceResult The response from the BatchPutGeofence
* service method, as returned by AWS Location service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public BatchPutGeofenceResult batchPutGeofence(BatchPutGeofenceRequest batchPutGeofenceRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(batchPutGeofenceRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new BatchPutGeofenceRequestMarshaller().marshall(batchPutGeofenceRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new BatchPutGeofenceResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Uploads position update data for one or more devices to a tracker
* resource (up to 10 devices per batch). Amazon Location uses the data when
* it reports the last known device position and position history. Amazon
* Location retains location data for 30 days.
*
*
*
* Position updates are handled based on the PositionFiltering
* property of the tracker. When PositionFiltering
is set to
* TimeBased
, updates are evaluated against linked geofence
* collections, and location data is stored at a maximum of one position per
* 30 second interval. If your update frequency is more often than every 30
* seconds, only one update per 30 seconds is stored for each unique device
* ID.
*
*
* When PositionFiltering
is set to DistanceBased
* filtering, location data is stored and evaluated against linked geofence
* collections only if the device has moved more than 30 m (98.4 ft).
*
*
* When PositionFiltering
is set to AccuracyBased
* filtering, location data is stored and evaluated against linked geofence
* collections only if the device has moved more than the measured accuracy.
* For example, if two consecutive updates from a device have a horizontal
* accuracy of 5 m and 10 m, the second update is neither stored or
* evaluated if the device has moved less than 15 m. If
* PositionFiltering
is set to AccuracyBased
* filtering, Amazon Location uses the default value
* { "Horizontal": 0}
when accuracy is not provided on a
* DevicePositionUpdate
.
*
*
*
* @param batchUpdateDevicePositionRequest
* @return batchUpdateDevicePositionResult The response from the
* BatchUpdateDevicePosition service method, as returned by AWS
* Location service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public BatchUpdateDevicePositionResult batchUpdateDevicePosition(
BatchUpdateDevicePositionRequest batchUpdateDevicePositionRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(batchUpdateDevicePositionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new BatchUpdateDevicePositionRequestMarshaller()
.marshall(batchUpdateDevicePositionRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new BatchUpdateDevicePositionResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Calculates a route given the following required parameters:
* DeparturePosition
and DestinationPosition
.
* Requires that you first create a route calculator resource.
*
*
* By default, a request that doesn't specify a departure time uses the best
* time of day to travel with the best traffic conditions when calculating
* the route.
*
*
* Additional options include:
*
*
* -
*
* Specifying a departure time using either DepartureTime
* or DepartNow
. This calculates a route based on predictive
* traffic data at the given time.
*
*
*
* You can't specify both DepartureTime
and
* DepartNow
in a single request. Specifying both parameters
* returns a validation error.
*
*
* -
*
* Specifying a travel mode using TravelMode sets the transportation
* mode used to calculate the routes. This also lets you specify additional
* route preferences in CarModeOptions
if traveling by
* Car
, or TruckModeOptions
if traveling by
* Truck
.
*
*
*
* If you specify walking
for the travel mode and your data
* provider is Esri, the start and destination must be within 40km.
*
*
*
*
* @param calculateRouteRequest
* @return calculateRouteResult The response from the CalculateRoute service
* method, as returned by AWS Location service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public CalculateRouteResult calculateRoute(CalculateRouteRequest calculateRouteRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(calculateRouteRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CalculateRouteRequestMarshaller().marshall(calculateRouteRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new CalculateRouteResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Calculates a route matrix given the following required parameters:
* DeparturePositions
and DestinationPositions
.
* CalculateRouteMatrix
calculates routes and returns the
* travel time and travel distance from each departure position to each
* destination position in the request. For example, given departure
* positions A and B, and destination positions X and Y,
* CalculateRouteMatrix
will return time and distance for
* routes from A to X, A to Y, B to X, and B to Y (in that order). The
* number of results returned (and routes calculated) will be the number of
* DeparturePositions
times the number of
* DestinationPositions
.
*
*
*
* Your account is charged for each route calculated, not the number of
* requests.
*
*
*
* Requires that you first create a route calculator resource.
*
*
* By default, a request that doesn't specify a departure time uses the best
* time of day to travel with the best traffic conditions when calculating
* routes.
*
*
* Additional options include:
*
*
* -
*
* Specifying a departure time using either DepartureTime
* or DepartNow
. This calculates routes based on predictive
* traffic data at the given time.
*
*
*
* You can't specify both DepartureTime
and
* DepartNow
in a single request. Specifying both parameters
* returns a validation error.
*
*
* -
*
* Specifying a travel mode using TravelMode sets the transportation
* mode used to calculate the routes. This also lets you specify additional
* route preferences in CarModeOptions
if traveling by
* Car
, or TruckModeOptions
if traveling by
* Truck
.
*
*
*
*
* @param calculateRouteMatrixRequest
* @return calculateRouteMatrixResult The response from the
* CalculateRouteMatrix service method, as returned by AWS Location
* service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public CalculateRouteMatrixResult calculateRouteMatrix(
CalculateRouteMatrixRequest calculateRouteMatrixRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(calculateRouteMatrixRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CalculateRouteMatrixRequestMarshaller()
.marshall(calculateRouteMatrixRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new CalculateRouteMatrixResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Creates a geofence collection, which manages and stores geofences.
*
*
* @param createGeofenceCollectionRequest
* @return createGeofenceCollectionResult The response from the
* CreateGeofenceCollection service method, as returned by AWS
* Location service.
* @throws InternalServerException
* @throws ConflictException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ServiceQuotaExceededException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public CreateGeofenceCollectionResult createGeofenceCollection(
CreateGeofenceCollectionRequest createGeofenceCollectionRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(createGeofenceCollectionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateGeofenceCollectionRequestMarshaller()
.marshall(createGeofenceCollectionRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new CreateGeofenceCollectionResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Creates an API key resource in your Amazon Web Services account, which
* lets you grant geo:GetMap*
actions for Amazon Location Map
* resources to the API key bearer.
*
*
*
* The API keys feature is in preview. We may add, change, or remove
* features before announcing general availability. For more information,
* see Using API keys.
*
*
*
* @param createKeyRequest
* @return createKeyResult The response from the CreateKey service method,
* as returned by AWS Location service.
* @throws InternalServerException
* @throws ConflictException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ServiceQuotaExceededException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public CreateKeyResult createKey(CreateKeyRequest createKeyRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(createKeyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateKeyRequestMarshaller().marshall(createKeyRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new CreateKeyResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Creates a map resource in your Amazon Web Services account, which
* provides map tiles of different styles sourced from global location data
* providers.
*
*
*
* If your application is tracking or routing assets you use in your
* business, such as delivery vehicles or employees, you must not use Esri
* as your geolocation provider. See section 82 of the Amazon Web Services service
* terms for more details.
*
*
*
* @param createMapRequest
* @return createMapResult The response from the CreateMap service method,
* as returned by AWS Location service.
* @throws InternalServerException
* @throws ConflictException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ServiceQuotaExceededException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public CreateMapResult createMap(CreateMapRequest createMapRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(createMapRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateMapRequestMarshaller().marshall(createMapRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new CreateMapResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Creates a place index resource in your Amazon Web Services account. Use a
* place index resource to geocode addresses and other text queries by using
* the SearchPlaceIndexForText
operation, and reverse geocode
* coordinates by using the SearchPlaceIndexForPosition
* operation, and enable autosuggestions by using the
* SearchPlaceIndexForSuggestions
operation.
*
*
*
* If your application is tracking or routing assets you use in your
* business, such as delivery vehicles or employees, you must not use Esri
* as your geolocation provider. See section 82 of the Amazon Web Services service
* terms for more details.
*
*
*
* @param createPlaceIndexRequest
* @return createPlaceIndexResult The response from the CreatePlaceIndex
* service method, as returned by AWS Location service.
* @throws InternalServerException
* @throws ConflictException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ServiceQuotaExceededException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public CreatePlaceIndexResult createPlaceIndex(CreatePlaceIndexRequest createPlaceIndexRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(createPlaceIndexRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreatePlaceIndexRequestMarshaller().marshall(createPlaceIndexRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new CreatePlaceIndexResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Creates a route calculator resource in your Amazon Web Services account.
*
*
* You can send requests to a route calculator resource to estimate travel
* time, distance, and get directions. A route calculator sources traffic
* and road network data from your chosen data provider.
*
*
*
* If your application is tracking or routing assets you use in your
* business, such as delivery vehicles or employees, you must not use Esri
* as your geolocation provider. See section 82 of the Amazon Web Services service
* terms for more details.
*
*
*
* @param createRouteCalculatorRequest
* @return createRouteCalculatorResult The response from the
* CreateRouteCalculator service method, as returned by AWS Location
* service.
* @throws InternalServerException
* @throws ConflictException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ServiceQuotaExceededException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public CreateRouteCalculatorResult createRouteCalculator(
CreateRouteCalculatorRequest createRouteCalculatorRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(createRouteCalculatorRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateRouteCalculatorRequestMarshaller()
.marshall(createRouteCalculatorRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new CreateRouteCalculatorResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Creates a tracker resource in your Amazon Web Services account, which
* lets you retrieve current and historical location of devices.
*
*
* @param createTrackerRequest
* @return createTrackerResult The response from the CreateTracker service
* method, as returned by AWS Location service.
* @throws InternalServerException
* @throws ConflictException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ServiceQuotaExceededException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public CreateTrackerResult createTracker(CreateTrackerRequest createTrackerRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(createTrackerRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new CreateTrackerRequestMarshaller().marshall(createTrackerRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new CreateTrackerResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Deletes a geofence collection from your Amazon Web Services account.
*
*
*
* This operation deletes the resource permanently. If the geofence
* collection is the target of a tracker resource, the devices will no
* longer be monitored.
*
*
*
* @param deleteGeofenceCollectionRequest
* @return deleteGeofenceCollectionResult The response from the
* DeleteGeofenceCollection service method, as returned by AWS
* Location service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public DeleteGeofenceCollectionResult deleteGeofenceCollection(
DeleteGeofenceCollectionRequest deleteGeofenceCollectionRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(deleteGeofenceCollectionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteGeofenceCollectionRequestMarshaller()
.marshall(deleteGeofenceCollectionRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new DeleteGeofenceCollectionResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Deletes the specified API key. The API key must have been deactivated
* more than 90 days previously.
*
*
* @param deleteKeyRequest
* @return deleteKeyResult The response from the DeleteKey service method,
* as returned by AWS Location service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public DeleteKeyResult deleteKey(DeleteKeyRequest deleteKeyRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(deleteKeyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteKeyRequestMarshaller().marshall(deleteKeyRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new DeleteKeyResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Deletes a map resource from your Amazon Web Services account.
*
*
*
* This operation deletes the resource permanently. If the map is being used
* in an application, the map may not render.
*
*
*
* @param deleteMapRequest
* @return deleteMapResult The response from the DeleteMap service method,
* as returned by AWS Location service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public DeleteMapResult deleteMap(DeleteMapRequest deleteMapRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(deleteMapRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteMapRequestMarshaller().marshall(deleteMapRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new DeleteMapResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Deletes a place index resource from your Amazon Web Services account.
*
*
*
* This operation deletes the resource permanently.
*
*
*
* @param deletePlaceIndexRequest
* @return deletePlaceIndexResult The response from the DeletePlaceIndex
* service method, as returned by AWS Location service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public DeletePlaceIndexResult deletePlaceIndex(DeletePlaceIndexRequest deletePlaceIndexRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(deletePlaceIndexRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeletePlaceIndexRequestMarshaller().marshall(deletePlaceIndexRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new DeletePlaceIndexResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Deletes a route calculator resource from your Amazon Web Services
* account.
*
*
*
* This operation deletes the resource permanently.
*
*
*
* @param deleteRouteCalculatorRequest
* @return deleteRouteCalculatorResult The response from the
* DeleteRouteCalculator service method, as returned by AWS Location
* service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public DeleteRouteCalculatorResult deleteRouteCalculator(
DeleteRouteCalculatorRequest deleteRouteCalculatorRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(deleteRouteCalculatorRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteRouteCalculatorRequestMarshaller()
.marshall(deleteRouteCalculatorRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new DeleteRouteCalculatorResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Deletes a tracker resource from your Amazon Web Services account.
*
*
*
* This operation deletes the resource permanently. If the tracker resource
* is in use, you may encounter an error. Make sure that the target resource
* isn't a dependency for your applications.
*
*
*
* @param deleteTrackerRequest
* @return deleteTrackerResult The response from the DeleteTracker service
* method, as returned by AWS Location service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public DeleteTrackerResult deleteTracker(DeleteTrackerRequest deleteTrackerRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(deleteTrackerRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DeleteTrackerRequestMarshaller().marshall(deleteTrackerRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new DeleteTrackerResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Retrieves the geofence collection details.
*
*
* @param describeGeofenceCollectionRequest
* @return describeGeofenceCollectionResult The response from the
* DescribeGeofenceCollection service method, as returned by AWS
* Location service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public DescribeGeofenceCollectionResult describeGeofenceCollection(
DescribeGeofenceCollectionRequest describeGeofenceCollectionRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(describeGeofenceCollectionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeGeofenceCollectionRequestMarshaller()
.marshall(describeGeofenceCollectionRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new DescribeGeofenceCollectionResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Retrieves the API key resource details.
*
*
*
* The API keys feature is in preview. We may add, change, or remove
* features before announcing general availability. For more information,
* see Using API keys.
*
*
*
* @param describeKeyRequest
* @return describeKeyResult The response from the DescribeKey service
* method, as returned by AWS Location service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public DescribeKeyResult describeKey(DescribeKeyRequest describeKeyRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(describeKeyRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeKeyRequestMarshaller().marshall(describeKeyRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new DescribeKeyResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Retrieves the map resource details.
*
*
* @param describeMapRequest
* @return describeMapResult The response from the DescribeMap service
* method, as returned by AWS Location service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public DescribeMapResult describeMap(DescribeMapRequest describeMapRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(describeMapRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeMapRequestMarshaller().marshall(describeMapRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new DescribeMapResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Retrieves the place index resource details.
*
*
* @param describePlaceIndexRequest
* @return describePlaceIndexResult The response from the DescribePlaceIndex
* service method, as returned by AWS Location service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public DescribePlaceIndexResult describePlaceIndex(
DescribePlaceIndexRequest describePlaceIndexRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(describePlaceIndexRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribePlaceIndexRequestMarshaller()
.marshall(describePlaceIndexRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new DescribePlaceIndexResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Retrieves the route calculator resource details.
*
*
* @param describeRouteCalculatorRequest
* @return describeRouteCalculatorResult The response from the
* DescribeRouteCalculator service method, as returned by AWS
* Location service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public DescribeRouteCalculatorResult describeRouteCalculator(
DescribeRouteCalculatorRequest describeRouteCalculatorRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(describeRouteCalculatorRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeRouteCalculatorRequestMarshaller()
.marshall(describeRouteCalculatorRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new DescribeRouteCalculatorResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Retrieves the tracker resource details.
*
*
* @param describeTrackerRequest
* @return describeTrackerResult The response from the DescribeTracker
* service method, as returned by AWS Location service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public DescribeTrackerResult describeTracker(DescribeTrackerRequest describeTrackerRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(describeTrackerRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeTrackerRequestMarshaller().marshall(describeTrackerRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new DescribeTrackerResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Removes the association between a tracker resource and a geofence
* collection.
*
*
*
* Once you unlink a tracker resource from a geofence collection, the
* tracker positions will no longer be automatically evaluated against
* geofences.
*
*
*
* @param disassociateTrackerConsumerRequest
* @return disassociateTrackerConsumerResult The response from the
* DisassociateTrackerConsumer service method, as returned by AWS
* Location service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public DisassociateTrackerConsumerResult disassociateTrackerConsumer(
DisassociateTrackerConsumerRequest disassociateTrackerConsumerRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(disassociateTrackerConsumerRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DisassociateTrackerConsumerRequestMarshaller()
.marshall(disassociateTrackerConsumerRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new DisassociateTrackerConsumerResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Retrieves a device's most recent position according to its sample time.
*
*
*
* Device positions are deleted after 30 days.
*
*
*
* @param getDevicePositionRequest
* @return getDevicePositionResult The response from the GetDevicePosition
* service method, as returned by AWS Location service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public GetDevicePositionResult getDevicePosition(
GetDevicePositionRequest getDevicePositionRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(getDevicePositionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetDevicePositionRequestMarshaller()
.marshall(getDevicePositionRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new GetDevicePositionResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Retrieves the device position history from a tracker resource within a
* specified range of time.
*
*
*
* Device positions are deleted after 30 days.
*
*
*
* @param getDevicePositionHistoryRequest
* @return getDevicePositionHistoryResult The response from the
* GetDevicePositionHistory service method, as returned by AWS
* Location service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public GetDevicePositionHistoryResult getDevicePositionHistory(
GetDevicePositionHistoryRequest getDevicePositionHistoryRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(getDevicePositionHistoryRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetDevicePositionHistoryRequestMarshaller()
.marshall(getDevicePositionHistoryRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new GetDevicePositionHistoryResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Retrieves the geofence details from a geofence collection.
*
*
* @param getGeofenceRequest
* @return getGeofenceResult The response from the GetGeofence service
* method, as returned by AWS Location service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public GetGeofenceResult getGeofence(GetGeofenceRequest getGeofenceRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(getGeofenceRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetGeofenceRequestMarshaller().marshall(getGeofenceRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new GetGeofenceResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Retrieves glyphs used to display labels on a map.
*
*
* @param getMapGlyphsRequest
* @return getMapGlyphsResult The response from the GetMapGlyphs service
* method, as returned by AWS Location service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public GetMapGlyphsResult getMapGlyphs(GetMapGlyphsRequest getMapGlyphsRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(getMapGlyphsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetMapGlyphsRequestMarshaller().marshall(getMapGlyphsRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new GetMapGlyphsResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Retrieves the sprite sheet corresponding to a map resource. The sprite
* sheet is a PNG image paired with a JSON document describing the offsets
* of individual icons that will be displayed on a rendered map.
*
*
* @param getMapSpritesRequest
* @return getMapSpritesResult The response from the GetMapSprites service
* method, as returned by AWS Location service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public GetMapSpritesResult getMapSprites(GetMapSpritesRequest getMapSpritesRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(getMapSpritesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetMapSpritesRequestMarshaller().marshall(getMapSpritesRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new GetMapSpritesResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Retrieves the map style descriptor from a map resource.
*
*
* The style descriptor contains specifications on how features render on a
* map. For example, what data to display, what order to display the data
* in, and the style for the data. Style descriptors follow the Mapbox Style
* Specification.
*
*
* @param getMapStyleDescriptorRequest
* @return getMapStyleDescriptorResult The response from the
* GetMapStyleDescriptor service method, as returned by AWS Location
* service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public GetMapStyleDescriptorResult getMapStyleDescriptor(
GetMapStyleDescriptorRequest getMapStyleDescriptorRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(getMapStyleDescriptorRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetMapStyleDescriptorRequestMarshaller()
.marshall(getMapStyleDescriptorRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new GetMapStyleDescriptorResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Retrieves a vector data tile from the map resource. Map tiles are used by
* clients to render a map. they're addressed using a grid arrangement with
* an X coordinate, Y coordinate, and Z (zoom) level.
*
*
* The origin (0, 0) is the top left of the map. Increasing the zoom level
* by 1 doubles both the X and Y dimensions, so a tile containing data for
* the entire world at (0/0/0) will be split into 4 tiles at zoom 1 (1/0/0,
* 1/0/1, 1/1/0, 1/1/1).
*
*
* @param getMapTileRequest
* @return getMapTileResult The response from the GetMapTile service method,
* as returned by AWS Location service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public GetMapTileResult getMapTile(GetMapTileRequest getMapTileRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(getMapTileRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetMapTileRequestMarshaller().marshall(getMapTileRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new GetMapTileResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Finds a place by its unique ID. A PlaceId
is returned by
* other search operations.
*
*
*
* A PlaceId is valid only if all of the following are the same in the
* original search request and the call to GetPlace
.
*
*
* -
*
* Customer Amazon Web Services account
*
*
* -
*
* Amazon Web Services Region
*
*
* -
*
* Data provider specified in the place index resource
*
*
*
*
*
* @param getPlaceRequest
* @return getPlaceResult The response from the GetPlace service method, as
* returned by AWS Location service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public GetPlaceResult getPlace(GetPlaceRequest getPlaceRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(getPlaceRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new GetPlaceRequestMarshaller().marshall(getPlaceRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new GetPlaceResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* A batch request to retrieve all device positions.
*
*
* @param listDevicePositionsRequest
* @return listDevicePositionsResult The response from the
* ListDevicePositions service method, as returned by AWS Location
* service.
* @throws InternalServerException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public ListDevicePositionsResult listDevicePositions(
ListDevicePositionsRequest listDevicePositionsRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(listDevicePositionsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListDevicePositionsRequestMarshaller()
.marshall(listDevicePositionsRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new ListDevicePositionsResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Lists geofence collections in your Amazon Web Services account.
*
*
* @param listGeofenceCollectionsRequest
* @return listGeofenceCollectionsResult The response from the
* ListGeofenceCollections service method, as returned by AWS
* Location service.
* @throws InternalServerException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public ListGeofenceCollectionsResult listGeofenceCollections(
ListGeofenceCollectionsRequest listGeofenceCollectionsRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(listGeofenceCollectionsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListGeofenceCollectionsRequestMarshaller()
.marshall(listGeofenceCollectionsRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new ListGeofenceCollectionsResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Lists geofences stored in a given geofence collection.
*
*
* @param listGeofencesRequest
* @return listGeofencesResult The response from the ListGeofences service
* method, as returned by AWS Location service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public ListGeofencesResult listGeofences(ListGeofencesRequest listGeofencesRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(listGeofencesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListGeofencesRequestMarshaller().marshall(listGeofencesRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new ListGeofencesResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Lists API key resources in your Amazon Web Services account.
*
*
*
* The API keys feature is in preview. We may add, change, or remove
* features before announcing general availability. For more information,
* see Using API keys.
*
*
*
* @param listKeysRequest
* @return listKeysResult The response from the ListKeys service method, as
* returned by AWS Location service.
* @throws InternalServerException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public ListKeysResult listKeys(ListKeysRequest listKeysRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(listKeysRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListKeysRequestMarshaller().marshall(listKeysRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new ListKeysResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Lists map resources in your Amazon Web Services account.
*
*
* @param listMapsRequest
* @return listMapsResult The response from the ListMaps service method, as
* returned by AWS Location service.
* @throws InternalServerException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public ListMapsResult listMaps(ListMapsRequest listMapsRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(listMapsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListMapsRequestMarshaller().marshall(listMapsRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new ListMapsResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Lists place index resources in your Amazon Web Services account.
*
*
* @param listPlaceIndexesRequest
* @return listPlaceIndexesResult The response from the ListPlaceIndexes
* service method, as returned by AWS Location service.
* @throws InternalServerException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public ListPlaceIndexesResult listPlaceIndexes(ListPlaceIndexesRequest listPlaceIndexesRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(listPlaceIndexesRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListPlaceIndexesRequestMarshaller().marshall(listPlaceIndexesRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new ListPlaceIndexesResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Lists route calculator resources in your Amazon Web Services account.
*
*
* @param listRouteCalculatorsRequest
* @return listRouteCalculatorsResult The response from the
* ListRouteCalculators service method, as returned by AWS Location
* service.
* @throws InternalServerException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public ListRouteCalculatorsResult listRouteCalculators(
ListRouteCalculatorsRequest listRouteCalculatorsRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(listRouteCalculatorsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListRouteCalculatorsRequestMarshaller()
.marshall(listRouteCalculatorsRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new ListRouteCalculatorsResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Returns a list of tags that are applied to the specified Amazon Location
* resource.
*
*
* @param listTagsForResourceRequest
* @return listTagsForResourceResult The response from the
* ListTagsForResource service method, as returned by AWS Location
* service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public ListTagsForResourceResult listTagsForResource(
ListTagsForResourceRequest listTagsForResourceRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(listTagsForResourceRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListTagsForResourceRequestMarshaller()
.marshall(listTagsForResourceRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new ListTagsForResourceResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Lists geofence collections currently associated to the given tracker
* resource.
*
*
* @param listTrackerConsumersRequest
* @return listTrackerConsumersResult The response from the
* ListTrackerConsumers service method, as returned by AWS Location
* service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public ListTrackerConsumersResult listTrackerConsumers(
ListTrackerConsumersRequest listTrackerConsumersRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(listTrackerConsumersRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListTrackerConsumersRequestMarshaller()
.marshall(listTrackerConsumersRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new ListTrackerConsumersResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Lists tracker resources in your Amazon Web Services account.
*
*
* @param listTrackersRequest
* @return listTrackersResult The response from the ListTrackers service
* method, as returned by AWS Location service.
* @throws InternalServerException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public ListTrackersResult listTrackers(ListTrackersRequest listTrackersRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(listTrackersRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new ListTrackersRequestMarshaller().marshall(listTrackersRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new ListTrackersResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Stores a geofence geometry in a given geofence collection, or updates the
* geometry of an existing geofence if a geofence ID is included in the
* request.
*
*
* @param putGeofenceRequest
* @return putGeofenceResult The response from the PutGeofence service
* method, as returned by AWS Location service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws ConflictException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public PutGeofenceResult putGeofence(PutGeofenceRequest putGeofenceRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(putGeofenceRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new PutGeofenceRequestMarshaller().marshall(putGeofenceRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new PutGeofenceResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Reverse geocodes a given coordinate and returns a legible address. Allows
* you to search for Places or points of interest near a given position.
*
*
* @param searchPlaceIndexForPositionRequest
* @return searchPlaceIndexForPositionResult The response from the
* SearchPlaceIndexForPosition service method, as returned by AWS
* Location service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public SearchPlaceIndexForPositionResult searchPlaceIndexForPosition(
SearchPlaceIndexForPositionRequest searchPlaceIndexForPositionRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(searchPlaceIndexForPositionRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new SearchPlaceIndexForPositionRequestMarshaller()
.marshall(searchPlaceIndexForPositionRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new SearchPlaceIndexForPositionResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Generates suggestions for addresses and points of interest based on
* partial or misspelled free-form text. This operation is also known as
* autocomplete, autosuggest, or fuzzy matching.
*
*
* Optional parameters let you narrow your search results by bounding box or
* country, or bias your search toward a specific position on the globe.
*
*
*
* You can search for suggested place names near a specified position by
* using BiasPosition
, or filter results within a bounding box
* by using FilterBBox
. These parameters are mutually
* exclusive; using both BiasPosition
and
* FilterBBox
in the same command returns an error.
*
*
*
* @param searchPlaceIndexForSuggestionsRequest
* @return searchPlaceIndexForSuggestionsResult The response from the
* SearchPlaceIndexForSuggestions service method, as returned by AWS
* Location service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public SearchPlaceIndexForSuggestionsResult searchPlaceIndexForSuggestions(
SearchPlaceIndexForSuggestionsRequest searchPlaceIndexForSuggestionsRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(searchPlaceIndexForSuggestionsRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new SearchPlaceIndexForSuggestionsRequestMarshaller()
.marshall(searchPlaceIndexForSuggestionsRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new SearchPlaceIndexForSuggestionsResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Geocodes free-form text, such as an address, name, city, or region to
* allow you to search for Places or points of interest.
*
*
* Optional parameters let you narrow your search results by bounding box or
* country, or bias your search toward a specific position on the globe.
*
*
*
* You can search for places near a given position using
* BiasPosition
, or filter results within a bounding box using
* FilterBBox
. Providing both parameters simultaneously returns
* an error.
*
*
*
* Search results are returned in order of highest to lowest relevance.
*
*
* @param searchPlaceIndexForTextRequest
* @return searchPlaceIndexForTextResult The response from the
* SearchPlaceIndexForText service method, as returned by AWS
* Location service.
* @throws InternalServerException
* @throws ResourceNotFoundException
* @throws AccessDeniedException
* @throws ValidationException
* @throws ThrottlingException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by AWS
* Location service indicating either a problem with the data in
* the request, or a server side issue.
*/
public SearchPlaceIndexForTextResult searchPlaceIndexForText(
SearchPlaceIndexForTextRequest searchPlaceIndexForTextRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(searchPlaceIndexForTextRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request request = null;
Response response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new SearchPlaceIndexForTextRequestMarshaller()
.marshall(searchPlaceIndexForTextRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller unmarshaller = new SearchPlaceIndexForTextResultJsonUnmarshaller();
JsonResponseHandler responseHandler = new JsonResponseHandler(
unmarshaller);
response = invoke(request, responseHandler, executionContext);
return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}
/**
*
* Assigns one or more tags (key-value pairs) to the specified Amazon
* Location Service resource.
*
*
* Tags can help you organize and categorize your resources. You can also
* use them to scope user permissions, by granting a user permission to
* access or change only resources with certain tag values.
*
*
* You can use the