ExAws. Location. Trackers
(ex_aws_location v0.1.0)
Copy Markdown
API calls for Amazon Location Service Trackers.
Tracker resources and the device positions sent to and retrieved from them.
Every function returns an operation struct to be passed to ExAws.request/2.
Operations
associate_tracker_consumer- AssociateTrackerConsumerbatch_delete_device_position_history- BatchDeleteDevicePositionHistorybatch_get_device_position- BatchGetDevicePositionbatch_update_device_position- BatchUpdateDevicePositioncreate_tracker- CreateTrackerdelete_tracker- DeleteTrackerdescribe_tracker- DescribeTrackerdisassociate_tracker_consumer- DisassociateTrackerConsumerget_device_position- GetDevicePositionget_device_position_history- GetDevicePositionHistorylist_device_positions- ListDevicePositionslist_tracker_consumers- ListTrackerConsumerslist_trackers- ListTrackersupdate_tracker- UpdateTrackerverify_device_position- VerifyDevicePosition
See https://docs.aws.amazon.com/location/previous/APIReference/API_Operations.html
Summary
Functions
Creates an association between a geofence collection and a tracker resource. This allows the tracker resource to communicate location data to the linked geofence collection.
Deletes the position history of one or more devices from a tracker resource.
Lists the latest device positions for requested devices.
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.
Creates a tracker resource in your Amazon Web Services account, which lets you retrieve current and historical location of devices.
Deletes a tracker resource from your Amazon Web Services account.
Retrieves the tracker resource details.
Removes the association between a tracker resource and a geofence collection.
Retrieves a device's most recent position according to its sample time.
Retrieves the device position history from a tracker resource within a specified range of time.
A batch request to retrieve all device positions.
Lists geofence collections currently associated to the given tracker resource.
Lists tracker resources in your Amazon Web Services account.
Updates the specified properties of a given tracker resource.
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.
Types
@type get_device_position_history_opts() :: [ end_time_exclusive: DateTime.t() | String.t(), max_results: integer(), next_token: String.t(), start_time_inclusive: DateTime.t() | String.t() ]
@type list_device_positions_opts() :: [ filter_geometry: ExAws.Location.Trackers.TrackingFilterGeometry.t(), max_results: integer(), next_token: String.t() ]
@type verify_device_position_opts() :: [{:distance_unit, String.t()}]
Functions
@spec associate_tracker_consumer(String.t(), String.t()) :: ExAws.Operation.JSON.t()
Creates an association between a geofence collection and a tracker resource. This allows the tracker resource to communicate location data to the linked geofence collection.
You can associate up to five geofence collections to each tracker resource.
Currently not supported — Cross-account configurations, such as creating associations between a tracker resource in one account and a geofence collection in another account.
Parameters
tracker_name- The name of the tracker resource to be associated with a geofence collection.consumer_arn- The Amazon Resource Name (ARN) for the geofence collection to be associated to tracker resource. Used when you need to specify a resource across all Amazon Web Services.
See https://docs.aws.amazon.com/location/previous/APIReference/API_AssociateTrackerConsumer.html
@spec batch_delete_device_position_history(String.t(), [String.t()]) :: ExAws.Operation.JSON.t()
Deletes the position history of one or more devices from a tracker resource.
Parameters
tracker_name- The name of the tracker resource to delete the device position history from.device_ids- Devices whose position history you want to delete.
See https://docs.aws.amazon.com/location/previous/APIReference/API_BatchDeleteDevicePositionHistory.html
@spec batch_get_device_position(String.t(), [String.t()]) :: ExAws.Operation.JSON.t()
Lists the latest device positions for requested devices.
Parameters
tracker_name- The tracker resource retrieving the device position.device_ids- Devices whose position you want to retrieve.
See https://docs.aws.amazon.com/location/previous/APIReference/API_BatchGetDevicePosition.html
@spec batch_update_device_position(String.t(), [ ExAws.Location.DevicePositionUpdate.t() ]) :: ExAws.Operation.JSON.t()
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.
Parameters
tracker_name- The name of the tracker resource to update.updates- Contains the position update details for each device, up to 10 devices.
See https://docs.aws.amazon.com/location/previous/APIReference/API_BatchUpdateDevicePosition.html
@spec create_tracker(String.t(), create_tracker_opts()) :: ExAws.Operation.JSON.t()
Creates a tracker resource in your Amazon Web Services account, which lets you retrieve current and historical location of devices.
Parameters
tracker_name- The name for the tracker resource.
Options
:description- An optional description for the tracker resource.:event_bridge_enabled- Whether to enable positionUPDATEevents from this tracker to be sent to EventBridge.:kms_key_enable_geospatial_queries- EnablesGeospatialQueriesfor a tracker that uses a Amazon Web Services KMS customer managed key.:kms_key_id- A key identifier for an Amazon Web Services KMS customer managed key. Enter a key ID, key ARN, alias name, or alias ARN.:position_filtering- Specifies the position filtering for the tracker resource. Valid values:TimeBased,DistanceBased,AccuracyBased.:tags- Applies one or more tags to the tracker resource. A tag is a key-value pair helps manage, identify, search, and filter your resources by labelling them.
See https://docs.aws.amazon.com/location/previous/APIReference/API_CreateTracker.html
@spec delete_tracker(String.t()) :: ExAws.Operation.RestQuery.t()
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.
Parameters
tracker_name- The name of the tracker resource to be deleted.
See https://docs.aws.amazon.com/location/previous/APIReference/API_DeleteTracker.html
@spec describe_tracker(String.t()) :: ExAws.Operation.RestQuery.t()
Retrieves the tracker resource details.
Parameters
tracker_name- The name of the tracker resource.
See https://docs.aws.amazon.com/location/previous/APIReference/API_DescribeTracker.html
Removes the association between a tracker resource and a geofence collection.
Once you unlink a tracker resource from a geofence collection, the tracker positions will no longer be automatically evaluated against geofences.
Parameters
tracker_name- The name of the tracker resource to be dissociated from the consumer.consumer_arn- The Amazon Resource Name (ARN) for the geofence collection to be disassociated from the tracker resource. Used when you need to specify a resource across all Amazon Web Services.
See https://docs.aws.amazon.com/location/previous/APIReference/API_DisassociateTrackerConsumer.html
Retrieves a device's most recent position according to its sample time.
Device positions are deleted after 30 days.
Parameters
tracker_name- The tracker resource receiving the position update.device_id- The device whose position you want to retrieve.
See https://docs.aws.amazon.com/location/previous/APIReference/API_GetDevicePosition.html
@spec get_device_position_history( String.t(), String.t(), get_device_position_history_opts() ) :: ExAws.Operation.JSON.t()
Retrieves the device position history from a tracker resource within a specified range of time.
Device positions are deleted after 30 days.
Parameters
tracker_name- The tracker resource receiving the request for the device position history.device_id- The device whose position history you want to retrieve.
Options
:end_time_exclusive- Specify the end time for the position history in ISO 8601 format:YYYY-MM-DDThh:mm:ss.sssZ. By default, the value will be the time that the request is made.:max_results- An optional limit for the number of device positions returned in a single call.:next_token- The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.:start_time_inclusive- Specify the start time for the position history in ISO 8601 format:YYYY-MM-DDThh:mm:ss.sssZ. By default, the value will be 24 hours prior to the time that the request is made.
See https://docs.aws.amazon.com/location/previous/APIReference/API_GetDevicePositionHistory.html
@spec list_device_positions(String.t(), list_device_positions_opts()) :: ExAws.Operation.JSON.t()
A batch request to retrieve all device positions.
Parameters
tracker_name- The tracker resource containing the requested devices.
Options
:filter_geometry- The geometry used to filter device positions.:max_results- An optional limit for the number of entries returned in a single call.:next_token- The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.
See https://docs.aws.amazon.com/location/previous/APIReference/API_ListDevicePositions.html
@spec list_tracker_consumers(String.t(), list_tracker_consumers_opts()) :: ExAws.Operation.JSON.t()
Lists geofence collections currently associated to the given tracker resource.
Parameters
tracker_name- The tracker resource whose associated geofence collections you want to list.
Options
:max_results- An optional limit for the number of resources returned in a single call.:next_token- The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.
See https://docs.aws.amazon.com/location/previous/APIReference/API_ListTrackerConsumers.html
@spec list_trackers(list_trackers_opts()) :: ExAws.Operation.JSON.t()
Lists tracker resources in your Amazon Web Services account.
Options
:max_results- An optional limit for the number of resources returned in a single call.:next_token- The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.
See https://docs.aws.amazon.com/location/previous/APIReference/API_ListTrackers.html
@spec update_tracker(String.t(), update_tracker_opts()) :: ExAws.Operation.JSON.t()
Updates the specified properties of a given tracker resource.
Parameters
tracker_name- The name of the tracker resource to update.
Options
:description- Updates the description for the tracker resource.:event_bridge_enabled- Whether to enable positionUPDATEevents from this tracker to be sent to EventBridge.:kms_key_enable_geospatial_queries- EnablesGeospatialQueriesfor a tracker that uses a Amazon Web Services KMS customer managed key.:position_filtering- Updates the position filtering for the tracker resource. Valid values:TimeBased,DistanceBased,AccuracyBased.
See https://docs.aws.amazon.com/location/previous/APIReference/API_UpdateTracker.html
@spec verify_device_position( String.t(), ExAws.Location.Trackers.DeviceState.t(), verify_device_position_opts() ) :: ExAws.Operation.JSON.t()
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
tracker_name- The name of the tracker resource to be associated with verification request.device_state- The device's state, including position, IP address, cell signals and Wi-Fi access points.
Options
:distance_unit- The distance unit for the verification request. Valid values:Kilometers,Miles.
See https://docs.aws.amazon.com/location/previous/APIReference/API_VerifyDevicePosition.html