Skip to main content

trackers

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

Overview

Nametrackers
TypeResource
Idaws.location.trackers

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
create_timestring (date-time)The timestamp for when the tracker resource was created in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.
descriptionstringThe optional description for the tracker resource.
event_bridge_enabledbooleanWhether UPDATE events from this tracker in EventBridge are enabled. If set to true these events will be sent to EventBridge.
kms_key_enable_geospatial_queriesbooleanEnables 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_idstringA key identifier for an Amazon Web Services KMS customer managed key assigned to the Amazon Location resource.
position_filteringstringThe position filtering method of the tracker resource. (TimeBased, DistanceBased, AccuracyBased)
pricing_planstringAlways returns RequestBasedUsage. (RequestBasedUsage, MobileAssetTracking, MobileAssetManagement)
pricing_plan_data_sourcestringNo longer used. Always returns an empty string.
tagsobjectThe tags associated with the tracker resource.
tracker_arnstringThe 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_namestringThe name of the tracker resource. (pattern: <code>[-._\w]+</code>)
update_timestring (date-time)The timestamp for when the tracker resource was last updated in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_trackerselecttracker_name, regionRetrieves the tracker resource details.
list_trackersselectregionLists tracker resources in your Amazon Web Services account.
create_trackerinsertregion, TrackerNameCreates a tracker resource in your Amazon Web Services account, which lets you retrieve current and historical location of devices.
update_trackerupdatetracker_name, regionUpdates the specified properties of a given tracker resource.
delete_trackerdeletetracker_name, regionDeletes 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_historyexectracker_name, region, DeviceIdsDeletes the position history of one or more devices from a tracker resource.
batch_update_device_positionexectracker_name, region, UpdatesUploads 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_positionexectracker_name, region, DeviceStateVerifies 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
tracker_namestringThe name of the tracker resource to be associated with verification request.

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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

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

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 }}"
}'
;