Amazon Location Service

2021/05/28 - Amazon Location Service - 10 new 8 updated api methods

Changes  Adds support for calculation of routes, resource tagging and customer provided KMS keys.

ListRouteCalculators (new) Link ¶

Lists route calculator resources in your AWS account.

See also: AWS API Documentation

Request Syntax

client.list_route_calculators(
    MaxResults=123,
    NextToken='string'
)
type MaxResults

integer

param MaxResults

An optional maximum number of results returned in a single call.

Default Value: 100

type NextToken

string

param NextToken

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.

Default Value: null

rtype

dict

returns

Response Syntax

{
    'Entries': [
        {
            'CalculatorName': 'string',
            'CreateTime': datetime(2015, 1, 1),
            'DataSource': 'string',
            'Description': 'string',
            'PricingPlan': 'RequestBasedUsage'|'MobileAssetTracking'|'MobileAssetManagement',
            'UpdateTime': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Entries (list) --

      Lists the route calculator resources that exist in your AWS account

      • (dict) --

        A route calculator resource listed in your AWS account.

        • CalculatorName (string) --

          The name of the route calculator resource.

        • CreateTime (datetime) --

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

          • For example, 2020–07-2T12:15:20.000Z+01:00

        • DataSource (string) --

          The data provider of traffic and road network data. Indicates one of the available providers:

          • Esri

          • Here

          For more information about data providers, see Amazon Location Service data providers.

        • Description (string) --

          The optional description of the route calculator resource.

        • PricingPlan (string) --

          The pricing plan for the specified route calculator resource.

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

        • UpdateTime (datetime) --

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

          • For example, 2020–07-2T12:15:20.000Z+01:00

    • NextToken (string) --

      A pagination token indicating there are additional pages available. You can use the token in a subsequent request to fetch the next set of results.

UntagResource (new) Link ¶

Removes one or more tags from the specified Amazon Location Service resource.

See also: AWS API Documentation

Request Syntax

client.untag_resource(
    ResourceArn='string',
    TagKeys=[
        'string',
    ]
)
type ResourceArn

string

param ResourceArn

[REQUIRED]

The Amazon Resource Name (ARN) of the resource from which you want to remove tags.

type TagKeys

list

param TagKeys

[REQUIRED]

The list of tag keys to remove from the resource.

  • (string) --

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

DeleteRouteCalculator (new) Link ¶

Deletes a route calculator resource from your AWS account.

Note

This operation deletes the resource permanently.

See also: AWS API Documentation

Request Syntax

client.delete_route_calculator(
    CalculatorName='string'
)
type CalculatorName

string

param CalculatorName

[REQUIRED]

The name of the route calculator resource to be deleted.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

CalculateRoute (new) Link ¶

Calculates a route given the following required parameters: DeparturePostiton and DestinationPosition . Requires that you first create aroute calculator resource

By default, a request that doesn't specify a departure time uses the best time of day to travel with the best traffic conditions when calculating the route.

Additional options include:

  • Specifying a departure time using either DepartureTime or DepartureNow . This calculates a route based on predictive traffic data at the given time.

Note

You can't specify both DepartureTime and DepartureNow in a single request. Specifying both parameters returns an error message.

  • Specifying a travel mode using TravelMode. This lets you specify additional route preference such as CarModeOptions if traveling by Car , or TruckModeOptions if traveling by Truck .

See also: AWS API Documentation

Request Syntax

client.calculate_route(
    CalculatorName='string',
    CarModeOptions={
        'AvoidFerries': True|False,
        'AvoidTolls': True|False
    },
    DepartNow=True|False,
    DeparturePosition=[
        123.0,
    ],
    DepartureTime=datetime(2015, 1, 1),
    DestinationPosition=[
        123.0,
    ],
    DistanceUnit='Kilometers'|'Miles',
    IncludeLegGeometry=True|False,
    TravelMode='Car'|'Truck'|'Walking',
    TruckModeOptions={
        'AvoidFerries': True|False,
        'AvoidTolls': True|False,
        'Dimensions': {
            'Height': 123.0,
            'Length': 123.0,
            'Unit': 'Meters'|'Feet',
            'Width': 123.0
        },
        'Weight': {
            'Total': 123.0,
            'Unit': 'Kilograms'|'Pounds'
        }
    },
    WaypointPositions=[
        [
            123.0,
        ],
    ]
)
type CalculatorName

string

param CalculatorName

[REQUIRED]

The name of the route calculator resource that you want to use to calculate a route.

type CarModeOptions

dict

param CarModeOptions

Specifies route preferences when traveling by Car , such as avoiding routes that use ferries or tolls.

Requirements: TravelMode must be specified as Car .

  • AvoidFerries (boolean) --

    Avoids ferries when calculating routes.

    Default Value: false

    Valid Values: false | true

  • AvoidTolls (boolean) --

    Avoids tolls when calculating routes.

    Default Value: false

    Valid Values: false | true

type DepartNow

boolean

param DepartNow

Sets the time of departure as the current time. Uses the current time to calculate a route. Otherwise, the best time of day to travel with the best traffic conditions is used to calculate the route.

Default Value: false

Valid Values: false | true

type DeparturePosition

list

param DeparturePosition

[REQUIRED]

The start position for the route. Defined in WGS 84 format: [longitude, latitude] .

  • For example, [-123.115, 49.285]

Note

If you specify a departure that's not located on a road, Amazon Location moves the position to the nearest road.

Valid Values: [-180 to 180,-90 to 90]

  • (float) --

type DepartureTime

datetime

param DepartureTime

Specifies the desired time of departure. Uses the given time to calculate a route. Otherwise, the best time of day to travel with the best traffic conditions is used to calculate the route.

Note

Setting a departure time in the past returns a 400 ValidationException error.

  • In ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ . For example, 2020–07-2T12:15:20.000Z+01:00

type DestinationPosition

list

param DestinationPosition

[REQUIRED]

The finish position for the route. Defined in WGS 84 format: [longitude, latitude] .

  • For example, [-122.339, 47.615]

Note

If you specify a destination that's not located on a road, Amazon Location moves the position to the nearest road.

Valid Values: [-180 to 180,-90 to 90]

  • (float) --

type DistanceUnit

string

param DistanceUnit

Set the unit system to specify the distance.

Default Value: Kilometers

type IncludeLegGeometry

boolean

param IncludeLegGeometry

Set to include the geometry details in the result for each path between a pair of positions.

Default Value: false

Valid Values: false | true

type TravelMode

string

param TravelMode

Specifies the mode of transport when calculating a route. Used in estimating the speed of travel and road compatibility.

The TravelMode you specify determines how you specify route preferences:

  • If traveling by Car use the CarModeOptions parameter.

  • If traveling by Truck use the TruckModeOptions parameter.

Default Value: Car

type TruckModeOptions

dict

param TruckModeOptions

Specifies route preferences when traveling by Truck , such as avoiding routes that use ferries or tolls, and truck specifications to consider when choosing an optimal road.

Requirements: TravelMode must be specified as Truck .

  • AvoidFerries (boolean) --

    Avoids ferries when calculating routes.

    Default Value: false

    Valid Values: false | true

  • AvoidTolls (boolean) --

    Avoids ferries when calculating routes.

    Default Value: false

    Valid Values: false | true

  • Dimensions (dict) --

    Specifies the truck's dimension specifications including length, height, width, and unit of measurement. Used to avoid roads that can't support the truck's dimensions.

    • Height (float) --

      The height of the truck.

      • For example, 4.5 .

    • Length (float) --

      The length of the truck.

      • For example, 15.5 .

    • Unit (string) --

      Specifies the unit of measurement for the truck dimensions.

      Default Value: Meters

    • Width (float) --

      The width of the truck.

      • For example, 4.5 .

  • Weight (dict) --

    Specifies the truck's weight specifications including total weight and unit of measurement. Used to avoid roads that can't support the truck's weight.

    • Total (float) --

      The total weight of the truck.

      • For example, 3500 .

    • Unit (string) --

      The unit of measurement to use for the truck weight.

      Default Value: Kilograms

type WaypointPositions

list

param WaypointPositions

Specifies an ordered list of up to 23 intermediate positions to include along a route between the departure position and destination position.

  • For example, from the DeparturePosition [-123.115, 49.285] , the route follows the order that the waypoint positions are given [[-122.757, 49.0021],[-122.349, 47.620]]

Note

If you specify a waypoint position that's not located on a road, Amazon Location moves the position to the nearest road.

Specifying more than 23 waypoints returns a 400 ValidationException error.

Valid Values: [-180 to 180,-90 to 90]

  • (list) --

    • (float) --

rtype

dict

returns

Response Syntax

{
    'Legs': [
        {
            'Distance': 123.0,
            'DurationSeconds': 123.0,
            'EndPosition': [
                123.0,
            ],
            'Geometry': {
                'LineString': [
                    [
                        123.0,
                    ],
                ]
            },
            'StartPosition': [
                123.0,
            ],
            'Steps': [
                {
                    'Distance': 123.0,
                    'DurationSeconds': 123.0,
                    'EndPosition': [
                        123.0,
                    ],
                    'GeometryOffset': 123,
                    'StartPosition': [
                        123.0,
                    ]
                },
            ]
        },
    ],
    'Summary': {
        'DataSource': 'string',
        'Distance': 123.0,
        'DistanceUnit': 'Kilometers'|'Miles',
        'DurationSeconds': 123.0,
        'RouteBBox': [
            123.0,
        ]
    }
}

Response Structure

  • (dict) --

    Returns the result of the route calculation. Metadata includes legs and route summary.

    • Legs (list) --

      Contains details about each path between a pair of positions included along a route such as: StartPosition , EndPosition , Distance , DurationSeconds , Geometry , and Steps . The number of legs returned corresponds to one less than the total number of positions in the request.

      For example, a route with a departure position and destination position returns one leg with the positions snapped to a nearby road:

      • The StartPosition is the departure position.

      • The EndPosition is the destination position.

      A route with a waypoint between the departure and destination position returns two legs with the positions snapped to a nearby road.:

      • Leg 1: The StartPosition is the departure position . The EndPosition is the waypoint positon.

      • Leg 2: The StartPosition is the waypoint position. The EndPosition is the destination position.

      • (dict) --

        Contains the calculated route's details for each path between a pair of positions. The number of legs returned corresponds to one less than the total number of positions in the request.

        For example, a route with a departure position and destination position returns one leg with the positions snapped to a nearby road:

        • The StartPosition is the departure position.

        • The EndPosition is the destination position.

        A route with a waypoint between the departure and destination position returns two legs with the positions snapped to a nearby road.:

        • Leg 1: The StartPosition is the departure position . The EndPosition is the waypoint positon.

        • Leg 2: The StartPosition is the waypoint position. The EndPosition is the destination position.

        • Distance (float) --

          The distance between the leg's StartPosition and EndPosition along a calculated route.

          • The default measurement is Kilometers unless the request specifies a DistanceUnit of Miles .

        • DurationSeconds (float) --

          The estimated travel time between the leg's StartPosition and EndPosition . The travel mode and departure time that you specify in the request determines the calculated time.

        • EndPosition (list) --

          The terminating position of the leg. Follows the format [longitude,latitude] .

          Note

          If the EndPosition isn't located on a road, it's snapped to a nearby road.

          • (float) --

        • Geometry (dict) --

          Contains the calculated route's path as a linestring geometry.

          • LineString (list) --

            An ordered list of positions used to plot a route on a map.

            The first position is closest to the start position for the leg, and the last position is the closest to the end position for the leg.

            • For example, [[-123.117, 49.284],[-123.115, 49.285],[-123.115, 49.285]]

            • (list) --

              • (float) --

        • StartPosition (list) --

          The starting position of the leg. Follows the format [longitude,latitude] .

          Note

          If the StartPosition isn't located on a road, it's snapped to a nearby road.

          • (float) --

        • Steps (list) --

          Contains a list of steps, which represent subsections of a leg. Each step provides instructions for how to move to the next step in the leg such as the step's start position, end position, travel distance, travel duration, and geometry offset.

          • (dict) --

            Represents an element of a leg within a route. A step contains instructions for how to move to the next step in the leg.

            • Distance (float) --

              The travel distance between the step's StartPosition and EndPosition .

            • DurationSeconds (float) --

              The estimated travel time, in seconds, from the step's StartPosition to the EndPosition . . The travel mode and departure time that you specify in the request determines the calculated time.

            • EndPosition (list) --

              The end position of a step. If the position the last step in the leg, this position is the same as the end position of the leg.

              • (float) --

            • GeometryOffset (integer) --

              Represents the start position, or index, in a sequence of steps within the leg's line string geometry. For example, the index of the first step in a leg geometry is 0 .

              Included in the response for queries that set IncludeLegGeometry to True .

            • StartPosition (list) --

              The starting position of a step. If the position is the first step in the leg, this position is the same as the start position of the leg.

              • (float) --

    • Summary (dict) --

      Contains information about the whole route, such as: RouteBBox , DataSource , Distance , DistanceUnit , and DurationSeconds

      • DataSource (string) --

        The data provider of traffic and road network data used to calculate the route. Indicates one of the available providers:

        • Esri

        • Here

        For more information about data providers, see Amazon Location Service data providers.

      • Distance (float) --

        The total distance covered by the route. The sum of the distance travelled between every stop on the route.

        Note

        The route distance can't be greater than 250 km. If the route exceeds 250 km, the response returns a 400 RoutesValidationException error.

      • DistanceUnit (string) --

        The unit of measurement for the distance.

      • DurationSeconds (float) --

        The total travel time for the route measured in seconds. The sum of the travel time between every stop on the route.

      • RouteBBox (list) --

        Specifies a geographical box surrounding a route. Used to zoom into a route when displaying it in a map. For example, [min x, min y, max x, max y]

        The first 2 bbox parameters describe the lower southwest corner:

        • The first bbox position is the X coordinate or longitude of the lower southwest corner.

        • The second bbox position is the Y coordinate or latitude of the lower southwest corner.

        The next 2 bbox parameters describe the upper northeast corner:

        • The third bbox position is the X coordinate, or longitude of the upper northeast corner.

        • The fourth bbox position is the Y coordinate, or longitude of the upper northeast corner.

        • (float) --

DescribeRouteCalculator (new) Link ¶

Retrieves the route calculator resource details.

See also: AWS API Documentation

Request Syntax

client.describe_route_calculator(
    CalculatorName='string'
)
type CalculatorName

string

param CalculatorName

[REQUIRED]

The name of the route calculator resource.

rtype

dict

returns

Response Syntax

{
    'CalculatorArn': 'string',
    'CalculatorName': 'string',
    'CreateTime': datetime(2015, 1, 1),
    'DataSource': 'string',
    'Description': 'string',
    'PricingPlan': 'RequestBasedUsage'|'MobileAssetTracking'|'MobileAssetManagement',
    'Tags': {
        'string': 'string'
    },
    'UpdateTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • CalculatorArn (string) --

      The Amazon Resource Name (ARN) for the Route calculator resource. Use the ARN when you specify a resource across AWS.

      • Format example: arn:aws:geo:region:account-id:route-calculator/ExampleCalculator

    • CalculatorName (string) --

      The name of the route calculator resource being described.

    • CreateTime (datetime) --

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

      • For example, 2020–07-2T12:15:20.000Z+01:00

    • DataSource (string) --

      The data provider of traffic and road network data. Indicates one of the available providers:

      • Esri

      • Here

      For more information about data providers, see Amazon Location Service data providers.

    • Description (string) --

      The optional description of the route calculator resource.

    • PricingPlan (string) --

      The pricing plan selected for the specified route calculator resource.

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

    • Tags (dict) --

      Tags associated with route calculator resource.

      • (string) --

        • (string) --

    • UpdateTime (datetime) --

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

      • For example, 2020–07-2T12:15:20.000Z+01:00

CreateRouteCalculator (new) Link ¶

Creates a route calculator resource in your AWS account.

You can send requests to a route calculator resource to estimate travel time, distance, and get directions. A route calculator sources traffic and road network data from your chosen data provider.

See also: AWS API Documentation

Request Syntax

client.create_route_calculator(
    CalculatorName='string',
    DataSource='string',
    Description='string',
    PricingPlan='RequestBasedUsage'|'MobileAssetTracking'|'MobileAssetManagement',
    Tags={
        'string': 'string'
    }
)
type CalculatorName

string

param CalculatorName

[REQUIRED]

The name of the route calculator resource.

Requirements:

  • Can use alphanumeric characters (A–Z, a–z, 0–9) , hyphens (-), periods (.), and underscores (_).

  • Must be a unique Route calculator resource name.

  • No spaces allowed. For example, ExampleRouteCalculator .

type DataSource

string

param DataSource

[REQUIRED]

Specifies the data provider of traffic and road network data.

Note

This field is case-sensitive. Enter the valid values as shown. For example, entering HERE returns an error.

Valid Values: Esri | Here

For more information about data providers, see Amazon Location Service data providers.

type Description

string

param Description

The optional description for the route calculator resource.

type PricingPlan

string

param PricingPlan

[REQUIRED]

Specifies the pricing plan for your route calculator resource.

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

type Tags

dict

param Tags

Applies one or more tags to the route calculator resource. A tag is a key-value pair helps manage, identify, search, and filter your resources by labelling them.

  • For example: { "tag1" : "value1" , "tag2" : "value2" }

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) --

rtype

dict

returns

Response Syntax

{
    'CalculatorArn': 'string',
    'CalculatorName': 'string',
    'CreateTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • CalculatorArn (string) --

      The Amazon Resource Name (ARN) for the route calculator resource. Use the ARN when you specify a resource across all AWS.

      • Format example: arn:aws:geo:region:account-id:route-calculator/ExampleCalculator

    • CalculatorName (string) --

      The name of the route calculator resource.

      • For example, ExampleRouteCalculator .

    • CreateTime (datetime) --

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

      • For example, 2020–07-2T12:15:20.000Z+01:00

BatchDeleteDevicePositionHistory (new) Link ¶

Deletes the position history of one or more devices from a tracker resource.

See also: AWS API Documentation

Request Syntax

client.batch_delete_device_position_history(
    DeviceIds=[
        'string',
    ],
    TrackerName='string'
)
type DeviceIds

list

param DeviceIds

[REQUIRED]

Devices whose position history you want to delete.

  • For example, for two devices: “DeviceIds” : [DeviceId1,DeviceId2]

  • (string) --

type TrackerName

string

param TrackerName

[REQUIRED]

The name of the tracker resource to delete the device position history from.

rtype

dict

returns

Response Syntax

{
    'Errors': [
        {
            'DeviceId': 'string',
            'Error': {
                'Code': 'AccessDeniedError'|'ConflictError'|'InternalServerError'|'ResourceNotFoundError'|'ThrottlingError'|'ValidationError',
                'Message': 'string'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • Errors (list) --

      Contains error details for each device history that failed to delete.

      • (dict) --

        Contains the tracker resource details.

        • DeviceId (string) --

          The ID of the device for this position.

        • Error (dict) --

          Contains the batch request error details associated with the request.

          • Code (string) --

            The error code associated with the batch request error.

          • Message (string) --

            A message with the reason for the batch request error.

TagResource (new) Link ¶

Assigns one or more tags (key-value pairs) to the specified Amazon Location Service resource.

<p>Tags can help you organize and categorize your resources. You can also use them to scope user permissions, by granting a user permission to access or change only resources with certain tag values.</p> <p>Tags don't have any semantic meaning to AWS and are interpreted strictly as strings of characters.</p> <p>You can use the <code>TagResource</code> action with an Amazon Location Service resource that already has tags. If you specify a new tag key for the resource, this tag is appended to the tags already associated with the resource. If you specify a tag key that is already associated with the resource, the new tag value that you specify replaces the previous value for that tag. </p> <p>You can associate as many as 50 tags with a resource.</p>

See also: AWS API Documentation

Request Syntax

client.tag_resource(
    ResourceArn='string',
    Tags={
        'string': 'string'
    }
)
type ResourceArn

string

param ResourceArn

[REQUIRED]

The Amazon Resource Name (ARN) of the resource whose tags you want to update.

type Tags

dict

param Tags

[REQUIRED]

The mapping from tag key to tag value for each tag associated with the specified resource.

  • (string) --

    • (string) --

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

ListTagsForResource (new) Link ¶

Returns the tags for the specified Amazon Location Service resource.

See also: AWS API Documentation

Request Syntax

client.list_tags_for_resource(
    ResourceArn='string'
)
type ResourceArn

string

param ResourceArn

[REQUIRED]

The Amazon Resource Name (ARN) of the resource whose tags you want to retrieve.

rtype

dict

returns

Response Syntax

{
    'Tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    • Tags (dict) --

      The mapping from tag key to tag value for each tag associated with the specified resource.

      • (string) --

        • (string) --

ListDevicePositions (new) Link ¶

Lists the latest device positions for requested devices.

See also: AWS API Documentation

Request Syntax

client.list_device_positions(
    MaxResults=123,
    NextToken='string',
    TrackerName='string'
)
type MaxResults

integer

param MaxResults

An optional limit for the number of entries returned in a single call.

Default value: 100

type NextToken

string

param NextToken

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.

Default value: null

type TrackerName

string

param TrackerName

[REQUIRED]

The tracker resource containing the requested devices.

rtype

dict

returns

Response Syntax

{
    'Entries': [
        {
            'DeviceId': 'string',
            'Position': [
                123.0,
            ],
            'SampleTime': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Entries (list) --

      Contains details about each device's last known position. These details includes the device ID, the time when the position was sampled on the device, the time that the service received the update, and the most recent coordinates.

      • (dict) --

        Contains the tracker resource details.

        • DeviceId (string) --

          The ID of the device for this position.

        • Position (list) --

          The last known device position. Empty if no positions currently stored.

          • (float) --

        • SampleTime (datetime) --

          The timestamp at which the device position was determined. Uses ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ .

    • NextToken (string) --

      A pagination token indicating there are additional pages available. You can use the token in a following request to fetch the next set of results.

CreateGeofenceCollection (updated) Link ¶
Changes (request)
{'KmsKeyId': 'string', 'Tags': {'string': 'string'}}

Creates a geofence collection, which manages and stores geofences.

See also: AWS API Documentation

Request Syntax

client.create_geofence_collection(
    CollectionName='string',
    Description='string',
    KmsKeyId='string',
    PricingPlan='RequestBasedUsage'|'MobileAssetTracking'|'MobileAssetManagement',
    PricingPlanDataSource='string',
    Tags={
        'string': 'string'
    }
)
type CollectionName

string

param CollectionName

[REQUIRED]

A custom name for the geofence collection.

Requirements:

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

  • Must be a unique geofence collection name.

  • No spaces allowed. For example, ExampleGeofenceCollection .

type Description

string

param Description

An optional description for the geofence collection.

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 PricingPlan

string

param PricingPlan

[REQUIRED]

Specifies the pricing plan for the geofence collection.

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

type PricingPlanDataSource

string

param PricingPlanDataSource

Specifies the data provider for the geofence collection.

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

Note

Amazon Location Service only uses PricingPlanDataSource to calculate billing for your geofence collection. Your data won't be shared with the data provider, and will remain in your AWS account or Region unless you move it.

Valid Values: Esri | Here

type Tags

dict

param Tags

Applies one or more tags to the geofence collection. 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) --

rtype

dict

returns

Response Syntax

{
    'CollectionArn': 'string',
    'CollectionName': 'string',
    'CreateTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • CollectionArn (string) --

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

      • Format example: arn:aws:geo:region:account-id:geofence-collection/ExampleGeofenceCollection

    • CollectionName (string) --

      The name for the geofence collection.

    • CreateTime (datetime) --

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

CreateMap (updated) Link ¶
Changes (request)
{'Tags': {'string': 'string'}}

Creates a map resource in your AWS account, which provides map tiles of different styles sourced from global location data providers.

See also: AWS API Documentation

Request Syntax

client.create_map(
    Configuration={
        'Style': 'string'
    },
    Description='string',
    MapName='string',
    PricingPlan='RequestBasedUsage'|'MobileAssetTracking'|'MobileAssetManagement',
    Tags={
        'string': 'string'
    }
)
type Configuration

dict

param Configuration

[REQUIRED]

Specifies the map style selected from an available data provider.

  • Style (string) -- [REQUIRED]

    Specifies the map style selected from an available data provider.

    Valid styles: RasterEsriImagery , VectorEsriStreets , VectorEsriTopographic , VectorEsriNavigation , VectorEsriDarkGrayCanvas , VectorEsriLightGrayCanvas , VectorHereBerlin .

    Note

    When using HERE as your data provider, and selecting the Style VectorHereBerlin , you may not use HERE Maps for Asset Management. See the AWS Service Terms for Amazon Location Service.

type Description

string

param Description

An optional description for the map resource.

type MapName

string

param MapName

[REQUIRED]

The name for the map resource.

Requirements:

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

  • Must be a unique map resource name.

  • No spaces allowed. For example, ExampleMap .

type PricingPlan

string

param PricingPlan

[REQUIRED]

Specifies the pricing plan for your map resource.

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

type Tags

dict

param Tags

Applies one or more tags to the map 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) --

rtype

dict

returns

Response Syntax

{
    'CreateTime': datetime(2015, 1, 1),
    'MapArn': 'string',
    'MapName': 'string'
}

Response Structure

  • (dict) --

    • CreateTime (datetime) --

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

    • MapArn (string) --

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

      • Format example: arn:aws:geo:region:account-id:maps/ExampleMap

    • MapName (string) --

      The name of the map resource.

CreatePlaceIndex (updated) Link ¶
Changes (request)
{'Tags': {'string': 'string'}}

Creates a place index resource in your AWS account, which supports functions with geospatial data sourced from your chosen data provider.

See also: AWS API Documentation

Request Syntax

client.create_place_index(
    DataSource='string',
    DataSourceConfiguration={
        'IntendedUse': 'SingleUse'|'Storage'
    },
    Description='string',
    IndexName='string',
    PricingPlan='RequestBasedUsage'|'MobileAssetTracking'|'MobileAssetManagement',
    Tags={
        'string': 'string'
    }
)
type DataSource

string

param DataSource

[REQUIRED]

Specifies the data provider of geospatial data.

Note

This field is case-sensitive. Enter the valid values as shown. For example, entering HERE will return an error.

Valid values include:

  • Esri

  • Here

Warning

Place index resources using HERE as a data provider can't be used to store results for locations in Japan. For more information, see the AWS Service Terms for Amazon Location Service.

For additional details on data providers, see the Amazon Location Service data providers page.

type DataSourceConfiguration

dict

param DataSourceConfiguration

Specifies the data storage option for requesting Places.

  • IntendedUse (string) --

    Specifies how the results of an operation will be stored by the caller.

    Valid values include:

    • SingleUse specifies that the results won't be stored.

    • Storage specifies that the result can be cached or stored in a database.

    Warning

    Place index resources using HERE as a data provider can't be configured to store results for locations in Japan when choosing Storage for the IntendedUse parameter.

    Default value: SingleUse

type Description

string

param Description

The optional description for the place index resource.

type IndexName

string

param IndexName

[REQUIRED]

The name of the place index resource.

Requirements:

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

  • Must be a unique place index resource name.

  • No spaces allowed. For example, ExamplePlaceIndex .

type PricingPlan

string

param PricingPlan

[REQUIRED]

Specifies the pricing plan for your place index resource.

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

type Tags

dict

param Tags

Applies one or more tags to the place index 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) --

rtype

dict

returns

Response Syntax

{
    'CreateTime': datetime(2015, 1, 1),
    'IndexArn': 'string',
    'IndexName': 'string'
}

Response Structure

  • (dict) --

    • CreateTime (datetime) --

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

    • IndexArn (string) --

      The Amazon Resource Name (ARN) for the place index resource. Used to specify a resource across all AWS.

      • Format example: arn:aws:geo:region:account-id:place-index/ExamplePlaceIndex

    • IndexName (string) --

      The name for the place index resource.

CreateTracker (updated) Link ¶
Changes (request)
{'KmsKeyId': 'string', 'Tags': {'string': 'string'}}

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',
    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 PricingPlan

string

param PricingPlan

[REQUIRED]

Specifies the pricing plan for the tracker resource.

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

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.

Note

Amazon Location Service only uses PricingPlanDataSource to calculate billing for your tracker resource. Your data will not be shared with the data provider, and will remain in your AWS account or Region unless you move it.

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.

DescribeGeofenceCollection (updated) Link ¶
Changes (response)
{'KmsKeyId': 'string', 'Tags': {'string': 'string'}}

Retrieves the geofence collection details.

See also: AWS API Documentation

Request Syntax

client.describe_geofence_collection(
    CollectionName='string'
)
type CollectionName

string

param CollectionName

[REQUIRED]

The name of the geofence collection.

rtype

dict

returns

Response Syntax

{
    'CollectionArn': 'string',
    'CollectionName': 'string',
    'CreateTime': datetime(2015, 1, 1),
    'Description': 'string',
    'KmsKeyId': 'string',
    'PricingPlan': 'RequestBasedUsage'|'MobileAssetTracking'|'MobileAssetManagement',
    'PricingPlanDataSource': 'string',
    'Tags': {
        'string': 'string'
    },
    'UpdateTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • CollectionArn (string) --

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

      • Format example: arn:aws:geo:region:account-id:geofence-collection/ExampleGeofenceCollection

    • CollectionName (string) --

      The name of the geofence collection.

    • CreateTime (datetime) --

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

    • Description (string) --

      The optional description for the geofence collection.

    • KmsKeyId (string) --

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

    • PricingPlan (string) --

      The pricing plan selected for the specified geofence collection.

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

    • PricingPlanDataSource (string) --

      The specified data provider for the geofence collection.

    • Tags (dict) --

      Displays the key, value pairs of tags associated with this resource.

      • (string) --

        • (string) --

    • UpdateTime (datetime) --

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

DescribeMap (updated) Link ¶
Changes (response)
{'Tags': {'string': 'string'}}

Retrieves the map resource details.

See also: AWS API Documentation

Request Syntax

client.describe_map(
    MapName='string'
)
type MapName

string

param MapName

[REQUIRED]

The name of the map resource.

rtype

dict

returns

Response Syntax

{
    'Configuration': {
        'Style': 'string'
    },
    'CreateTime': datetime(2015, 1, 1),
    'DataSource': 'string',
    'Description': 'string',
    'MapArn': 'string',
    'MapName': 'string',
    'PricingPlan': 'RequestBasedUsage'|'MobileAssetTracking'|'MobileAssetManagement',
    'Tags': {
        'string': 'string'
    },
    'UpdateTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • Configuration (dict) --

      Specifies the map tile style selected from a partner data provider.

      • Style (string) --

        Specifies the map style selected from an available data provider.

        Valid styles: RasterEsriImagery , VectorEsriStreets , VectorEsriTopographic , VectorEsriNavigation , VectorEsriDarkGrayCanvas , VectorEsriLightGrayCanvas , VectorHereBerlin .

        Note

        When using HERE as your data provider, and selecting the Style VectorHereBerlin , you may not use HERE Maps for Asset Management. See the AWS Service Terms for Amazon Location Service.

    • CreateTime (datetime) --

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

    • DataSource (string) --

      Specifies the data provider for the associated map tiles.

    • Description (string) --

      The optional description for the map resource.

    • MapArn (string) --

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

      • Format example: arn:aws:geo:region:account-id:maps/ExampleMap

    • MapName (string) --

      The map style selected from an available provider.

    • PricingPlan (string) --

      The pricing plan selected for the specified map resource.

      <p>For additional details and restrictions on each pricing plan option, see the <a href="https://aws.amazon.com/location/pricing/">Amazon Location Service pricing page</a>.</p>

    • Tags (dict) --

      Tags associated with the map resource.

      • (string) --

        • (string) --

    • UpdateTime (datetime) --

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

DescribePlaceIndex (updated) Link ¶
Changes (response)
{'Tags': {'string': 'string'}}

Retrieves the place index resource details.

See also: AWS API Documentation

Request Syntax

client.describe_place_index(
    IndexName='string'
)
type IndexName

string

param IndexName

[REQUIRED]

The name of the place index resource.

rtype

dict

returns

Response Syntax

{
    'CreateTime': datetime(2015, 1, 1),
    'DataSource': 'string',
    'DataSourceConfiguration': {
        'IntendedUse': 'SingleUse'|'Storage'
    },
    'Description': 'string',
    'IndexArn': 'string',
    'IndexName': 'string',
    'PricingPlan': 'RequestBasedUsage'|'MobileAssetTracking'|'MobileAssetManagement',
    'Tags': {
        'string': 'string'
    },
    'UpdateTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • CreateTime (datetime) --

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

    • DataSource (string) --

      The data provider of geospatial data. Indicates one of the available providers:

      • Esri

      • Here

      For additional details on data providers, see the Amazon Location Service data providers page.

    • DataSourceConfiguration (dict) --

      The specified data storage option for requesting Places.

      • IntendedUse (string) --

        Specifies how the results of an operation will be stored by the caller.

        Valid values include:

        • SingleUse specifies that the results won't be stored.

        • Storage specifies that the result can be cached or stored in a database.

        Warning

        Place index resources using HERE as a data provider can't be configured to store results for locations in Japan when choosing Storage for the IntendedUse parameter.

        Default value: SingleUse

    • Description (string) --

      The optional description for the place index resource.

    • IndexArn (string) --

      The Amazon Resource Name (ARN) for the place index resource. Used to specify a resource across all AWS.

      • Format example: arn:aws:geo:region:account-id:place-index/ExamplePlaceIndex

    • IndexName (string) --

      The name of the place index resource being described.

    • PricingPlan (string) --

      The pricing plan selected for the specified place index resource.

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

    • Tags (dict) --

      Tags associated with place index resource.

      • (string) --

        • (string) --

    • UpdateTime (datetime) --

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

DescribeTracker (updated) Link ¶
Changes (response)
{'KmsKeyId': 'string', 'Tags': {'string': 'string'}}

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',
    '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.

    • PricingPlan (string) --

      The pricing plan selected for the specified tracker resource.

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

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