aws-cdk.aws-location-alpha


Nameaws-cdk.aws-location-alpha JSON
Version 2.170.0a0 PyPI version JSON
download
home_pagehttps://github.com/aws/aws-cdk
SummaryThe CDK Construct Library for AWS::Location
upload_time2024-11-22 04:42:32
maintainerNone
docs_urlNone
authorAmazon Web Services
requires_python~=3.8
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # AWS::Location Construct Library

<!--BEGIN STABILITY BANNER-->---


![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge)

> The APIs of higher level constructs in this module are experimental and under active development.
> They are subject to non-backward compatible changes or removal in any future version. These are
> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be
> announced in the release notes. This means that while you may use them, you may need to update
> your source code when upgrading to a newer version of this package.

---
<!--END STABILITY BANNER-->

This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.

Amazon Location Service lets you add location data and functionality to applications, which
includes capabilities such as maps, points of interest, geocoding, routing, geofences, and
tracking. Amazon Location provides location-based services (LBS) using high-quality data from
global, trusted providers Esri and HERE. With affordable data, tracking and geofencing
capabilities, and built-in metrics for health monitoring, you can build sophisticated
location-enabled applications.

## Map

The Amazon Location Service Map resource gives you access to the underlying basemap data for a map.
You use the Map resource with a map rendering library to add an interactive map to your application.
You can add other functionality to your map, such as markers (or pins), routes, and polygon areas, as needed for your application.

For information about how to use map resources in practice, see [Using Amazon Location Maps in your application](https://docs.aws.amazon.com/location/latest/developerguide/using-maps.html).

To create a map, define a `Map`:

```python
location.Map(self, "Map",
    map_name="my-map",
    style=location.Style.VECTOR_ESRI_NAVIGATION,
    custom_layers=[location.CustomLayer.POI]
)
```

Use the `grant()` or `grantRendering()` method to grant the given identity permissions to perform actions
on the map:

```python
# role: iam.Role


map = location.Map(self, "Map",
    style=location.Style.VECTOR_ESRI_NAVIGATION
)
map.grant_rendering(role)
```

## Place Index

A key function of Amazon Location Service is the ability to search the geolocation information.
Amazon Location provides this functionality via the Place index resource. The place index includes
which [data provider](https://docs.aws.amazon.com/location/latest/developerguide/what-is-data-provider.html)
to use for the search.

To create a place index, define a `PlaceIndex`:

```python
location.PlaceIndex(self, "PlaceIndex",
    place_index_name="MyPlaceIndex",  # optional, defaults to a generated name
    data_source=location.DataSource.HERE
)
```

Use the `grant()` or `grantSearch()` method to grant the given identity permissions to perform actions
on the place index:

```python
# role: iam.Role


place_index = location.PlaceIndex(self, "PlaceIndex")
place_index.grant_search(role)
```

## Geofence Collection

Geofence collection resources allow you to store and manage geofences—virtual boundaries on a map.
You can evaluate locations against a geofence collection resource and get notifications when the location
update crosses the boundary of any of the geofences in the geofence collection.

```python
# key: kms.Key


location.GeofenceCollection(self, "GeofenceCollection",
    geofence_collection_name="MyGeofenceCollection",  # optional, defaults to a generated name
    kms_key=key
)
```

Use the `grant()` or `grantRead()` method to grant the given identity permissions to perform actions
on the geofence collection:

```python
# role: iam.Role


geofence_collection = location.GeofenceCollection(self, "GeofenceCollection",
    geofence_collection_name="MyGeofenceCollection"
)

geofence_collection.grant_read(role)
```

## Route Calculator

Route calculator resources allow you to find routes and estimate travel time based on up-to-date road network and live traffic information from your chosen data provider.

For more information, see [Routes](https://docs.aws.amazon.com/location/latest/developerguide/route-concepts.html).

To create a route calculator, define a `RouteCalculator`:

```python
location.RouteCalculator(self, "RouteCalculator",
    route_calculator_name="MyRouteCalculator",  # optional, defaults to a generated name
    data_source=location.DataSource.ESRI
)
```

Use the `grant()` or `grantRead()` method to grant the given identity permissions to perform actions
on the route calculator:

```python
# role: iam.Role


route_calculator = location.RouteCalculator(self, "RouteCalculator",
    data_source=location.DataSource.ESRI
)
route_calculator.grant_read(role)
```

## Tracker

A tracker stores position updates for a collection of devices. The tracker can be used to query the devices' current location or location history. It stores the updates, but reduces storage space and visual noise by filtering the locations before storing them.

For more information, see [Trackers](https://docs.aws.amazon.com/location/latest/developerguide/geofence-tracker-concepts.html#tracking-overview).

To create a tracker, define a `Tracker`:

```python
# key: kms.Key


location.Tracker(self, "Tracker",
    tracker_name="MyTracker",  # optional, defaults to a generated name
    kms_key=key
)
```

Use the `grant()`, `grantUpdateDevicePositions` or `grantRead()` method to grant the given identity permissions to perform actions
on the geofence collection:

```python
# role: iam.Role


tracker = location.Tracker(self, "Tracker",
    tracker_name="MyTracker"
)

tracker.grant_read(role)
```

If you want to associate a tracker with geofence collections, define a `geofenceCollections` property or use `addGeofenceCollections` method.

```python
# geofence_collection: location.GeofenceCollection
# geofence_collection_for_add: location.GeofenceCollection
# tracker: location.Tracker


tracker = location.Tracker(self, "Tracker",
    tracker_name="MyTracker",
    geofence_collections=[geofence_collection]
)

tracker.add_geofence_collections(geofence_collection_for_add)
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/aws/aws-cdk",
    "name": "aws-cdk.aws-location-alpha",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "~=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Amazon Web Services",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/8d/3a/876f79625bc8df97d913c0b02d6eb74fc3383576b716eeee05a267713e68/aws_cdk_aws_location_alpha-2.170.0a0.tar.gz",
    "platform": null,
    "description": "# AWS::Location Construct Library\n\n<!--BEGIN STABILITY BANNER-->---\n\n\n![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge)\n\n> The APIs of higher level constructs in this module are experimental and under active development.\n> They are subject to non-backward compatible changes or removal in any future version. These are\n> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be\n> announced in the release notes. This means that while you may use them, you may need to update\n> your source code when upgrading to a newer version of this package.\n\n---\n<!--END STABILITY BANNER-->\n\nThis module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.\n\nAmazon Location Service lets you add location data and functionality to applications, which\nincludes capabilities such as maps, points of interest, geocoding, routing, geofences, and\ntracking. Amazon Location provides location-based services (LBS) using high-quality data from\nglobal, trusted providers Esri and HERE. With affordable data, tracking and geofencing\ncapabilities, and built-in metrics for health monitoring, you can build sophisticated\nlocation-enabled applications.\n\n## Map\n\nThe Amazon Location Service Map resource gives you access to the underlying basemap data for a map.\nYou use the Map resource with a map rendering library to add an interactive map to your application.\nYou can add other functionality to your map, such as markers (or pins), routes, and polygon areas, as needed for your application.\n\nFor information about how to use map resources in practice, see [Using Amazon Location Maps in your application](https://docs.aws.amazon.com/location/latest/developerguide/using-maps.html).\n\nTo create a map, define a `Map`:\n\n```python\nlocation.Map(self, \"Map\",\n    map_name=\"my-map\",\n    style=location.Style.VECTOR_ESRI_NAVIGATION,\n    custom_layers=[location.CustomLayer.POI]\n)\n```\n\nUse the `grant()` or `grantRendering()` method to grant the given identity permissions to perform actions\non the map:\n\n```python\n# role: iam.Role\n\n\nmap = location.Map(self, \"Map\",\n    style=location.Style.VECTOR_ESRI_NAVIGATION\n)\nmap.grant_rendering(role)\n```\n\n## Place Index\n\nA key function of Amazon Location Service is the ability to search the geolocation information.\nAmazon Location provides this functionality via the Place index resource. The place index includes\nwhich [data provider](https://docs.aws.amazon.com/location/latest/developerguide/what-is-data-provider.html)\nto use for the search.\n\nTo create a place index, define a `PlaceIndex`:\n\n```python\nlocation.PlaceIndex(self, \"PlaceIndex\",\n    place_index_name=\"MyPlaceIndex\",  # optional, defaults to a generated name\n    data_source=location.DataSource.HERE\n)\n```\n\nUse the `grant()` or `grantSearch()` method to grant the given identity permissions to perform actions\non the place index:\n\n```python\n# role: iam.Role\n\n\nplace_index = location.PlaceIndex(self, \"PlaceIndex\")\nplace_index.grant_search(role)\n```\n\n## Geofence Collection\n\nGeofence collection resources allow you to store and manage geofences\u2014virtual boundaries on a map.\nYou can evaluate locations against a geofence collection resource and get notifications when the location\nupdate crosses the boundary of any of the geofences in the geofence collection.\n\n```python\n# key: kms.Key\n\n\nlocation.GeofenceCollection(self, \"GeofenceCollection\",\n    geofence_collection_name=\"MyGeofenceCollection\",  # optional, defaults to a generated name\n    kms_key=key\n)\n```\n\nUse the `grant()` or `grantRead()` method to grant the given identity permissions to perform actions\non the geofence collection:\n\n```python\n# role: iam.Role\n\n\ngeofence_collection = location.GeofenceCollection(self, \"GeofenceCollection\",\n    geofence_collection_name=\"MyGeofenceCollection\"\n)\n\ngeofence_collection.grant_read(role)\n```\n\n## Route Calculator\n\nRoute calculator resources allow you to find routes and estimate travel time based on up-to-date road network and live traffic information from your chosen data provider.\n\nFor more information, see [Routes](https://docs.aws.amazon.com/location/latest/developerguide/route-concepts.html).\n\nTo create a route calculator, define a `RouteCalculator`:\n\n```python\nlocation.RouteCalculator(self, \"RouteCalculator\",\n    route_calculator_name=\"MyRouteCalculator\",  # optional, defaults to a generated name\n    data_source=location.DataSource.ESRI\n)\n```\n\nUse the `grant()` or `grantRead()` method to grant the given identity permissions to perform actions\non the route calculator:\n\n```python\n# role: iam.Role\n\n\nroute_calculator = location.RouteCalculator(self, \"RouteCalculator\",\n    data_source=location.DataSource.ESRI\n)\nroute_calculator.grant_read(role)\n```\n\n## Tracker\n\nA tracker stores position updates for a collection of devices. The tracker can be used to query the devices' current location or location history. It stores the updates, but reduces storage space and visual noise by filtering the locations before storing them.\n\nFor more information, see [Trackers](https://docs.aws.amazon.com/location/latest/developerguide/geofence-tracker-concepts.html#tracking-overview).\n\nTo create a tracker, define a `Tracker`:\n\n```python\n# key: kms.Key\n\n\nlocation.Tracker(self, \"Tracker\",\n    tracker_name=\"MyTracker\",  # optional, defaults to a generated name\n    kms_key=key\n)\n```\n\nUse the `grant()`, `grantUpdateDevicePositions` or `grantRead()` method to grant the given identity permissions to perform actions\non the geofence collection:\n\n```python\n# role: iam.Role\n\n\ntracker = location.Tracker(self, \"Tracker\",\n    tracker_name=\"MyTracker\"\n)\n\ntracker.grant_read(role)\n```\n\nIf you want to associate a tracker with geofence collections, define a `geofenceCollections` property or use `addGeofenceCollections` method.\n\n```python\n# geofence_collection: location.GeofenceCollection\n# geofence_collection_for_add: location.GeofenceCollection\n# tracker: location.Tracker\n\n\ntracker = location.Tracker(self, \"Tracker\",\n    tracker_name=\"MyTracker\",\n    geofence_collections=[geofence_collection]\n)\n\ntracker.add_geofence_collections(geofence_collection_for_add)\n```\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "The CDK Construct Library for AWS::Location",
    "version": "2.170.0a0",
    "project_urls": {
        "Homepage": "https://github.com/aws/aws-cdk",
        "Source": "https://github.com/aws/aws-cdk.git"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dbe0811207da45494a95e29c1427a7493e1811899bf50194914ef045fdae5c8f",
                "md5": "b2ee1029b321536e82b78c027fe4573f",
                "sha256": "b61d79a050fcb61e1cbebc37fa3e878903533e78d621ef3c9ec5e77e693b89de"
            },
            "downloads": -1,
            "filename": "aws_cdk.aws_location_alpha-2.170.0a0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b2ee1029b321536e82b78c027fe4573f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "~=3.8",
            "size": 86918,
            "upload_time": "2024-11-22T04:41:47",
            "upload_time_iso_8601": "2024-11-22T04:41:47.905231Z",
            "url": "https://files.pythonhosted.org/packages/db/e0/811207da45494a95e29c1427a7493e1811899bf50194914ef045fdae5c8f/aws_cdk.aws_location_alpha-2.170.0a0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8d3a876f79625bc8df97d913c0b02d6eb74fc3383576b716eeee05a267713e68",
                "md5": "46b75e616d47f9b6636ac91863913097",
                "sha256": "f2a1c959f0c823a637936e58129015fa2900507630a8ec22f1f5c9627de516c9"
            },
            "downloads": -1,
            "filename": "aws_cdk_aws_location_alpha-2.170.0a0.tar.gz",
            "has_sig": false,
            "md5_digest": "46b75e616d47f9b6636ac91863913097",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "~=3.8",
            "size": 88424,
            "upload_time": "2024-11-22T04:42:32",
            "upload_time_iso_8601": "2024-11-22T04:42:32.691267Z",
            "url": "https://files.pythonhosted.org/packages/8d/3a/876f79625bc8df97d913c0b02d6eb74fc3383576b716eeee05a267713e68/aws_cdk_aws_location_alpha-2.170.0a0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-22 04:42:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "aws",
    "github_project": "aws-cdk",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "aws-cdk.aws-location-alpha"
}
        
Elapsed time: 0.43364s