device_position_histories
Creates, updates, deletes, gets or lists a device_position_histories resource.
Overview
| Name | device_position_histories |
| Type | Resource |
| Id | aws.location.device_position_histories |
Fields
The following fields are returned by SELECT queries:
- get_device_position_history
| Name | Datatype | Description |
|---|---|---|
accuracy | object | The accuracy of the device position. |
device_id | string | The device whose position you retrieved. (pattern: <code>[-._\p{L}\p{N}]+</code>) |
position | array | The last known device position. |
position_properties | object | The properties associated with the position. |
received_time | string (date-time) | The timestamp for when the tracker resource received the device position in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ. |
sample_time | string (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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_device_position_history | select | tracker_name, device_id, region | Retrieves 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.
| Name | Datatype | Description |
|---|---|---|
device_id | string | The device whose position history you want to retrieve. |
region | string | AWS region (default: us-east-1) |
tracker_name | string | The tracker resource receiving the request for the device position history. |
SELECT examples
- get_device_position_history
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
;