Managing your route calculator resources (V1)
This page documents the previous Routes API (V1). Use it
only for existing applications. The Routes V2 API is the latest version.
Use it for all new applications; see the latest Amazon Location Service Routes developer
guide.
The latest API calls CalculateRoutes (plural) directly. This
operation is under the geo-routes namespace. It is exposed as
@aws-sdk/client-geo-routes for JavaScript and
boto3.client('geo-routes') for Python.
There is no RouteCalculator resource to create, describe, or
delete.
You can manage your route calculator resources using the Amazon Location console, the AWS CLI,
or the Amazon Location APIs.
List your route calculator resources
You can view your route calculator list using the Amazon Location console, the AWS CLI, or
the Amazon Location APIs:
- Console
-
To view a list of route calculators using the
Amazon Location console
- API
-
Use the ListRouteCalculators
operation from the
Amazon Location Routes APIs.
The following example is an API request to get a list of route
calculators in the AWS account.
POST /routes/v0/list-calculators
The following is an example response for ListRouteCalculators:
{
"Entries": [
{
"CalculatorName": "ExampleCalculator",
"CreateTime": 2020-09-30T22:59:34.142Z,
"DataSource": "Esri",
"Description": "string",
"UpdateTime": 2020-09-30T23:59:34.142Z
}
],
"NextToken": "1234-5678-9012"
}
- CLI
-
Use the list-route-calculators command.
The following example is an AWS CLI to get a list of route calculators
in the AWS account.
aws location list-route-calculators
Get route calculator details
You can get details about any route calculator resource in your AWS account
using the Amazon Location console, the AWS CLI, or the Amazon Location APIs:
- Console
-
To view the details of a route calculator using
the Amazon Location console
- API
-
Use the DescribeRouteCalculator
operation from the
Amazon Location Routes APIs.
The following example is an API request to get the route calculator
details for ExampleCalculator.
GET /routes/v0/calculators/ExampleCalculator
The following is an example response for DescribeRouteCalculator:
{
"CalculatorArn": "arn:aws:geo:us-west-2:123456789012:route-calculator/ExampleCalculator",
"CalculatorName": "ExampleCalculator",
"CreateTime": 2020-09-30T22:59:34.142Z,
"DataSource": "Esri",
"Description": "string",
"Tags": {
"Tag1" : "Value1"
},
"UpdateTime": 2020-09-30T23:59:34.142Z
}
- CLI
-
Use the describe-route-calculator command.
The following example is an AWS CLI to get the route calculator details
for ExampleCalculator.
aws location describe-route-calculator \
--calculator-name "ExampleCalculator"
Delete a route calculator
You can delete a route calculator from your AWS account using the Amazon Location
console, the AWS CLI, or the Amazon Location APIs:
- Console
-
To delete a route calculator using the Amazon Location
console
This operation deletes the resource permanently.
- API
-
Use the DeleteRouteCalculator
operation from the
Amazon Location Routes APIs.
The following example is an API request to delete the geofence
collection ExampleCalculator.
DELETE /routes/v0/calculators/ExampleCalculator
The following is an example response for DeleteRouteCalculator:
HTTP/1.1 200
- CLI
-
Use the delete-route-calculator command.
The following example is an AWS CLI command to delete the geofence
collection ExampleCalculator.
aws location delete-route-calculator \
--calculator-name "ExampleCalculator"