Amazon Location Service

2021/10/05 - Amazon Location Service - 3 updated api methods

Changes  Add support for PositionFiltering.

CreateTracker (updated) Link ¶
Changes (request)
{'PositionFiltering': 'TimeBased | DistanceBased'}

Creates a tracker resource in your AWS account, which lets you retrieve current and historical location of devices.

See also: AWS API Documentation

Request Syntax

client.create_tracker(
    Description='string',
    KmsKeyId='string',
    PositionFiltering='TimeBased'|'DistanceBased',
    PricingPlan='RequestBasedUsage'|'MobileAssetTracking'|'MobileAssetManagement',
    PricingPlanDataSource='string',
    Tags={
        'string': 'string'
    },
    TrackerName='string'
)
type Description:

string

param Description:

An optional description for the tracker resource.

type KmsKeyId:

string

param KmsKeyId:

A key identifier for an AWS KMS customer managed key. Enter a key ID, key ARN, alias name, or alias ARN.

type PositionFiltering:

string

param PositionFiltering:

Specifies the position filtering for the tracker resource.

Valid values:

  • TimeBased - Location updates are evaluated against linked geofence collections, but not every location update is stored. If your update frequency is more often than 30 seconds, only one update per 30 seconds is stored for each unique device ID.

  • DistanceBased - If the device has moved less than 30 m (98.4 ft), location updates are ignored. Location updates within this distance are neither evaluated against linked geofence collections, nor stored. This helps control costs by reducing the number of geofence evaluations and device positions to retrieve. Distance-based filtering can also reduce the jitter effect when displaying device trajectory on a map.

This field is optional. If not specified, the default value is TimeBased.

type PricingPlan:

string

param PricingPlan:

[REQUIRED]

Specifies the pricing plan for the tracker resource.

For additional details and restrictions on each pricing plan option, see Amazon Location Service pricing.

type PricingPlanDataSource:

string

param PricingPlanDataSource:

Specifies the data provider for the tracker resource.

  • Required value for the following pricing plans: MobileAssetTracking ``| ``MobileAssetManagement

For more information about Data Providers, and Pricing plans, see the Amazon Location Service product page.

Valid values: Esri | Here

type Tags:

dict

param 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.

Format: "key" : "value"

Restrictions:

  • Maximum 50 tags per resource

  • Each resource tag must be unique with a maximum of one value.

  • Maximum key length: 128 Unicode characters in UTF-8

  • Maximum value length: 256 Unicode characters in UTF-8

  • Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters: + - = . _ : / @.

  • (string) --

    • (string) --

type TrackerName:

string

param TrackerName:

[REQUIRED]

The name for the tracker resource.

Requirements:

  • Contain only alphanumeric characters (A-Z, a-z, 0-9) , hyphens (-), periods (.), and underscores (_).

  • Must be a unique tracker resource name.

  • No spaces allowed. For example, ExampleTracker.

rtype:

dict

returns:

Response Syntax

{
    'CreateTime': datetime(2015, 1, 1),
    'TrackerArn': 'string',
    'TrackerName': 'string'
}

Response Structure

  • (dict) --

    • CreateTime (datetime) --

      The timestamp for when the tracker resource was created in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

    • TrackerArn (string) --

      The Amazon Resource Name (ARN) for the tracker resource. Used when you need to specify a resource across all AWS.

      • Format example: arn:aws:geo:region:account-id:tracker/ExampleTracker

    • TrackerName (string) --

      The name of the tracker resource.

DescribeTracker (updated) Link ¶
Changes (response)
{'PositionFiltering': 'TimeBased | DistanceBased'}

Retrieves the tracker resource details.

See also: AWS API Documentation

Request Syntax

client.describe_tracker(
    TrackerName='string'
)
type TrackerName:

string

param TrackerName:

[REQUIRED]

The name of the tracker resource.

rtype:

dict

returns:

Response Syntax

{
    'CreateTime': datetime(2015, 1, 1),
    'Description': 'string',
    'KmsKeyId': 'string',
    'PositionFiltering': 'TimeBased'|'DistanceBased',
    'PricingPlan': 'RequestBasedUsage'|'MobileAssetTracking'|'MobileAssetManagement',
    'PricingPlanDataSource': 'string',
    'Tags': {
        'string': 'string'
    },
    'TrackerArn': 'string',
    'TrackerName': 'string',
    'UpdateTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • CreateTime (datetime) --

      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.

    • KmsKeyId (string) --

      A key identifier for an AWS KMS customer managed key assigned to the Amazon Location resource.

    • PositionFiltering (string) --

      The position filtering method of the tracker resource.

    • PricingPlan (string) --

      The pricing plan selected for the specified tracker resource.

      For additional details and restrictions on each pricing plan option, see Amazon Location Service pricing.

    • PricingPlanDataSource (string) --

      The specified data provider for the tracker resource.

    • Tags (dict) --

      The tags associated with the tracker resource.

      • (string) --

        • (string) --

    • TrackerArn (string) --

      The Amazon Resource Name (ARN) for the tracker resource. Used when you need to specify a resource across all AWS.

      • Format example: arn:aws:geo:region:account-id:tracker/ExampleTracker

    • TrackerName (string) --

      The name of the tracker resource.

    • UpdateTime (datetime) --

      The timestamp for when the tracker resource was last updated in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

UpdateTracker (updated) Link ¶
Changes (request)
{'PositionFiltering': 'TimeBased | DistanceBased'}

Updates the specified properties of a given tracker resource.

See also: AWS API Documentation

Request Syntax

client.update_tracker(
    Description='string',
    PositionFiltering='TimeBased'|'DistanceBased',
    PricingPlan='RequestBasedUsage'|'MobileAssetTracking'|'MobileAssetManagement',
    PricingPlanDataSource='string',
    TrackerName='string'
)
type Description:

string

param Description:

Updates the description for the tracker resource.

type PositionFiltering:

string

param PositionFiltering:

Updates the position filtering for the tracker resource.

Valid values:

  • TimeBased - Location updates are evaluated against linked geofence collections, but not every location update is stored. If your update frequency is more often than 30 seconds, only one update per 30 seconds is stored for each unique device ID.

  • DistanceBased - If the device has moved less than 30 m (98.4 ft), location updates are ignored. Location updates within this distance are neither evaluated against linked geofence collections, nor stored. This helps control costs by reducing the number of geofence evaluations and device positions to retrieve. Distance-based filtering can also reduce the jitter effect when displaying device trajectory on a map.

type PricingPlan:

string

param PricingPlan:

Updates the pricing plan for the tracker resource.

For more information about each pricing plan option restrictions, see Amazon Location Service pricing.

type PricingPlanDataSource:

string

param PricingPlanDataSource:

Updates the data provider for the tracker resource.

A required value for the following pricing plans: MobileAssetTracking``| ``MobileAssetManagement

For more information about data providers and pricing plans, see the Amazon Location Service product page

type TrackerName:

string

param TrackerName:

[REQUIRED]

The name of the tracker resource to update.

rtype:

dict

returns:

Response Syntax

{
    'TrackerArn': 'string',
    'TrackerName': 'string',
    'UpdateTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • TrackerArn (string) --

      The Amazon Resource Name (ARN) of the updated tracker resource. Used to specify a resource across AWS.

      • Format example: arn:aws:geo:region:account-id:tracker/ExampleTracker

    • TrackerName (string) --

      The name of the updated tracker resource.

    • UpdateTime (datetime) --

      The timestamp for when the tracker resource was last updated in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.