route_calculators
Creates, updates, deletes or gets a route_calculator resource or lists route_calculators in a region
Overview
| Name | route_calculators |
| Type | Resource |
| Description | Definition of AWS::Location::RouteCalculator Resource Type |
| Id | awscc.location.route_calculators |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
calculator_arn | string | |
calculator_name | string | |
create_time | string | The datetime value in ISO 8601 format. The timezone is always UTC. (YYYY-MM-DDThh:mm:ss.sssZ) |
data_source | string | |
description | string | |
pricing_plan | string | |
tags | array | An array of key-value pairs to apply to this resource. |
arn | string | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
calculator_name | string | |
region | string | AWS region. |
For more information, see AWS::Location::RouteCalculator.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | route_calculators | INSERT | DataSource, CalculatorName, region |
delete_resource | route_calculators | DELETE | Identifier, region |
update_resource | route_calculators | UPDATE | Identifier, PatchDocument, region |
list_resources | route_calculators_list_only | SELECT | region |
get_resource | route_calculators | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual route_calculator.
SELECT
region,
calculator_arn,
calculator_name,
create_time,
data_source,
description,
pricing_plan,
tags,
update_time,
arn
FROM awscc.location.route_calculators
WHERE
region = 'us-east-1' AND
Identifier = '{{ calculator_name }}';
Lists all route_calculators in a region.
SELECT
region,
calculator_name
FROM awscc.location.route_calculators_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new route_calculator resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.location.route_calculators (
CalculatorName,
DataSource,
region
)
SELECT
'{{ calculator_name }}',
'{{ data_source }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.location.route_calculators (
CalculatorName,
DataSource,
Description,
PricingPlan,
Tags,
region
)
SELECT
'{{ calculator_name }}',
'{{ data_source }}',
'{{ description }}',
'{{ pricing_plan }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: route_calculator
props:
- name: calculator_name
value: '{{ calculator_name }}'
- name: data_source
value: '{{ data_source }}'
- name: description
value: '{{ description }}'
- name: pricing_plan
value: '{{ pricing_plan }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a route_calculator resource, using stack-deploy.
/*+ update */
UPDATE awscc.location.route_calculators
SET PatchDocument = string('{{ {
"Description": description,
"PricingPlan": pricing_plan,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ calculator_name }}';
DELETE example
/*+ delete */
DELETE FROM awscc.location.route_calculators
WHERE
Identifier = '{{ calculator_name }}' AND
region = 'us-east-1';
Permissions
To operate on the route_calculators resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
geo:CreateRouteCalculator,
geo:DescribeRouteCalculator,
geo:TagResource,
geo:UntagResource
geo:DescribeRouteCalculator
geo:CreateRouteCalculator,
geo:DescribeRouteCalculator,
geo:TagResource,
geo:UntagResource,
geo:UpdateRouteCalculator
geo:DeleteRouteCalculator,
geo:DescribeRouteCalculator
geo:ListRouteCalculators