Skip to main content

device_position_histories

Creates, updates, deletes, gets or lists a device_position_histories resource.

Overview

Namedevice_position_histories
TypeResource
Idaws.location.device_position_histories

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
accuracyobjectThe accuracy of the device position.
device_idstringThe device whose position you retrieved. (pattern: <code>[-._\p{L}\p{N}]+</code>)
positionarrayThe last known device position.
position_propertiesobjectThe properties associated with the position.
received_timestring (date-time)The timestamp for when the tracker resource received the device position in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.
sample_timestring (date-time)The timestamp at which the device's position was determined. Uses ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_device_position_historyselecttracker_name, device_id, regionRetrieves the device position history from a tracker resource within a specified range of time. Device positions are deleted after 30 days.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
device_idstringThe device whose position history you want to retrieve.
regionstringAWS region (default: us-east-1)
tracker_namestringThe tracker resource receiving the request for the device position history.

SELECT examples

Retrieves the device position history from a tracker resource within a specified range of time. Device positions are deleted after 30 days.

SELECT
accuracy,
device_id,
position,
position_properties,
received_time,
sample_time
FROM aws.location.device_position_histories
WHERE tracker_name = '{{ tracker_name }}' -- required
AND device_id = '{{ device_id }}' -- required
AND region = '{{ region }}' -- required
;