LocationService / Client / get_device_position
get_device_position#
- LocationService.Client.get_device_position(**kwargs)#
Retrieves a device’s most recent position according to its sample time.
Note
Device positions are deleted after 30 days.
See also: AWS API Documentation
Request Syntax
response = client.get_device_position( DeviceId='string', TrackerName='string' )
- Parameters:
DeviceId (string) –
[REQUIRED]
The device whose position you want to retrieve.
TrackerName (string) –
[REQUIRED]
The tracker resource receiving the position update.
- Return type:
dict
- Returns:
Response Syntax
{ 'Accuracy': { 'Horizontal': 123.0 }, 'DeviceId': 'string', 'Position': [ 123.0, ], 'PositionProperties': { 'string': 'string' }, 'ReceivedTime': datetime(2015, 1, 1), 'SampleTime': datetime(2015, 1, 1) }
Response Structure
(dict) –
Accuracy (dict) –
The accuracy of the device position.
Horizontal (float) –
Estimated maximum distance, in meters, between the measured position and the true position of a device, along the Earth’s surface.
DeviceId (string) –
The device whose position you retrieved.
Position (list) –
The last known device position.
(float) –
PositionProperties (dict) –
The properties associated with the position.
(string) –
(string) –
ReceivedTime (datetime) –
The timestamp for when the tracker resource received the device position in ISO 8601 <https://www.iso.org/iso-8601-date-and-time-format.html>`__format: ``YYYY-MM-DDThh:mm:ss.sssZ`.
SampleTime (datetime) –
The timestamp at which the device’s position was determined. Uses ISO 8601 <https://www.iso.org/iso-8601-date-and-time-format.html>`__format: ``YYYY-MM-DDThh:mm:ss.sssZ`.
Exceptions
LocationService.Client.exceptions.InternalServerException
LocationService.Client.exceptions.ResourceNotFoundException
LocationService.Client.exceptions.AccessDeniedException
LocationService.Client.exceptions.ValidationException
LocationService.Client.exceptions.ThrottlingException