trackers
Creates, updates, deletes, gets or lists a trackers resource.
Overview
| Name | trackers |
| Type | Resource |
| Id | aws.location.trackers |
Fields
The following fields are returned by SELECT queries:
- describe_tracker
- list_trackers
| Name | Datatype | Description |
|---|---|---|
create_time | string (date-time) | The timestamp for when the tracker resource was created in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ. |
description | string | The optional description for the tracker resource. |
event_bridge_enabled | boolean | Whether UPDATE events from this tracker in EventBridge are enabled. If set to true these events will be sent to EventBridge. |
kms_key_enable_geospatial_queries | boolean | Enables GeospatialQueries for a tracker that uses a Amazon Web Services KMS customer managed key. This parameter is only used if you are using a KMS customer managed key. If you wish to encrypt your data using your own KMS customer managed key, then the Bounding Polygon Queries feature will be disabled by default. This is because by using this feature, a representation of your device positions will not be encrypted using the your KMS managed key. The exact device position, however; is still encrypted using your managed key. You can choose to opt-in to the Bounding Polygon Quseries feature. This is done by setting the KmsKeyEnableGeospatialQueries parameter to true when creating or updating a Tracker. |
kms_key_id | string | A key identifier for an Amazon Web Services KMS customer managed key assigned to the Amazon Location resource. |
position_filtering | string | The position filtering method of the tracker resource. (TimeBased, DistanceBased, AccuracyBased) |
pricing_plan | string | Always returns RequestBasedUsage. (RequestBasedUsage, MobileAssetTracking, MobileAssetManagement) |
pricing_plan_data_source | string | No longer used. Always returns an empty string. |
tags | object | The tags associated with the tracker resource. |
tracker_arn | string | The Amazon Resource Name (ARN) for the tracker resource. Used when you need to specify a resource across all Amazon Web Services. Format example: arn:aws:geo:region:account-id:tracker/ExampleTracker (pattern: <code>arn(:[a-z0-9]+([.-][a-z0-9]+)){2}(:([a-z0-9]+([.-][a-z0-9]+))?){2}:([^/].*)?</code>) |
tracker_name | string | The name of the tracker resource. (pattern: <code>[-._\w]+</code>) |
update_time | string (date-time) | The timestamp for when the tracker resource was last updated in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ. |
| Name | Datatype | Description |
|---|---|---|
create_time | string (date-time) | The timestamp for when the tracker resource was created in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ. |
description | string | The description for the tracker resource. |
pricing_plan | string | Always returns RequestBasedUsage. (RequestBasedUsage, MobileAssetTracking, MobileAssetManagement) |
pricing_plan_data_source | string | No longer used. Always returns an empty string. |
tracker_name | string | The name of the tracker resource. (pattern: <code>[-._\w]+</code>) |
update_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 |
|---|---|---|---|---|
describe_tracker | select | tracker_name, region | Retrieves the tracker resource details. | |
list_trackers | select | region | Lists tracker resources in your Amazon Web Services account. | |
create_tracker | insert | region, TrackerName | Creates a tracker resource in your Amazon Web Services account, which lets you retrieve current and historical location of devices. | |
update_tracker | update | tracker_name, region | Updates the specified properties of a given tracker resource. | |
delete_tracker | delete | tracker_name, region | 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. | |
batch_delete_device_position_history | exec | tracker_name, region, DeviceIds | Deletes the position history of one or more devices from a tracker resource. | |
batch_update_device_position | exec | tracker_name, region, Updates | 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. | |
verify_device_position | exec | tracker_name, region, DeviceState | Verifies the integrity of the device's position by determining if it was reported behind a proxy, and by comparing it to an inferred position estimated based on the device's state. The Location Integrity SDK provides enhanced features related to device verification, and it is available for use by request. To get access to the SDK, contact Sales Support. |
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 |
|---|---|---|
region | string | AWS region (default: us-east-1) |
tracker_name | string | The name of the tracker resource to be associated with verification request. |
SELECT examples
- describe_tracker
- list_trackers
Retrieves the tracker resource details.
SELECT
create_time,
description,
event_bridge_enabled,
kms_key_enable_geospatial_queries,
kms_key_id,
position_filtering,
pricing_plan,
pricing_plan_data_source,
tags,
tracker_arn,
tracker_name,
update_time
FROM aws.location.trackers
WHERE tracker_name = '{{ tracker_name }}' -- required
AND region = '{{ region }}' -- required
;
Lists tracker resources in your Amazon Web Services account.
SELECT
create_time,
description,
pricing_plan,
pricing_plan_data_source,
tracker_name,
update_time
FROM aws.location.trackers
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_tracker
- Manifest
Creates a tracker resource in your Amazon Web Services account, which lets you retrieve current and historical location of devices.
INSERT INTO aws.location.trackers (
TrackerName,
PricingPlan,
KmsKeyId,
PricingPlanDataSource,
Description,
Tags,
PositionFiltering,
EventBridgeEnabled,
KmsKeyEnableGeospatialQueries,
region
)
SELECT
'{{ TrackerName }}' /* required */,
'{{ PricingPlan }}',
'{{ KmsKeyId }}',
'{{ PricingPlanDataSource }}',
'{{ Description }}',
'{{ Tags }}',
'{{ PositionFiltering }}',
{{ EventBridgeEnabled }},
{{ KmsKeyEnableGeospatialQueries }},
'{{ region }}'
RETURNING
create_time,
tracker_arn,
tracker_name
;
# Description fields are for documentation purposes
- name: trackers
props:
- name: region
value: "{{ region }}"
description: Required parameter for the trackers resource.
- name: TrackerName
value: "{{ TrackerName }}"
- name: PricingPlan
value: "{{ PricingPlan }}"
valid_values: ['RequestBasedUsage', 'MobileAssetTracking', 'MobileAssetManagement']
- name: KmsKeyId
value: "{{ KmsKeyId }}"
- name: PricingPlanDataSource
value: "{{ PricingPlanDataSource }}"
- name: Description
value: "{{ Description }}"
- name: Tags
value: "{{ Tags }}"
- name: PositionFiltering
value: "{{ PositionFiltering }}"
valid_values: ['TimeBased', 'DistanceBased', 'AccuracyBased']
- name: EventBridgeEnabled
value: {{ EventBridgeEnabled }}
- name: KmsKeyEnableGeospatialQueries
value: {{ KmsKeyEnableGeospatialQueries }}
UPDATE examples
- update_tracker
Updates the specified properties of a given tracker resource.
UPDATE aws.location.trackers
SET
PricingPlan = '{{ PricingPlan }}',
PricingPlanDataSource = '{{ PricingPlanDataSource }}',
Description = '{{ Description }}',
PositionFiltering = '{{ PositionFiltering }}',
EventBridgeEnabled = {{ EventBridgeEnabled }},
KmsKeyEnableGeospatialQueries = {{ KmsKeyEnableGeospatialQueries }}
WHERE
tracker_name = '{{ tracker_name }}' --required
AND region = '{{ region }}' --required
RETURNING
tracker_arn,
tracker_name,
update_time;
DELETE examples
- delete_tracker
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.
DELETE FROM aws.location.trackers
WHERE tracker_name = '{{ tracker_name }}' --required
AND region = '{{ region }}' --required
;
Lifecycle Methods
- batch_delete_device_position_history
- batch_update_device_position
- verify_device_position
Deletes the position history of one or more devices from a tracker resource.
EXEC aws.location.trackers.batch_delete_device_position_history
@tracker_name='{{ tracker_name }}' --required,
@region='{{ region }}' --required
@@json=
'{
"DeviceIds": "{{ DeviceIds }}"
}'
;
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.
EXEC aws.location.trackers.batch_update_device_position
@tracker_name='{{ tracker_name }}' --required,
@region='{{ region }}' --required
@@json=
'{
"Updates": "{{ Updates }}"
}'
;
Verifies the integrity of the device's position by determining if it was reported behind a proxy, and by comparing it to an inferred position estimated based on the device's state. The Location Integrity SDK provides enhanced features related to device verification, and it is available for use by request. To get access to the SDK, contact Sales Support.
EXEC aws.location.trackers.verify_device_position
@tracker_name='{{ tracker_name }}' --required,
@region='{{ region }}' --required
@@json=
'{
"DeviceState": "{{ DeviceState }}",
"DistanceUnit": "{{ DistanceUnit }}"
}'
;