class RouteCalculator (construct)
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Location.Alpha.RouteCalculator |
![]() | github.com/aws/aws-cdk-go/awscdklocationalpha/v2#RouteCalculator |
![]() | software.amazon.awscdk.services.location.alpha.RouteCalculator |
![]() | aws_cdk.aws_location_alpha.RouteCalculator |
![]() | @aws-cdk/aws-location-alpha ยป RouteCalculator |
Implements
IConstruct
, IDependable
, IResource
, IRoute
A Route Calculator.
See also: https://docs.aws.amazon.com/location/latest/developerguide/places-concepts.html
Example
new location.RouteCalculator(this, 'RouteCalculator', {
routeCalculatorName: 'MyRouteCalculator', // optional, defaults to a generated name
dataSource: location.DataSource.ESRI,
});
Initializer
new RouteCalculator(scope: Construct, id: string, props: RouteCalculatorProps)
Parameters
- scope
Construct
- id
string
- props
Route
Calculator Props
Construct Props
Name | Type | Description |
---|---|---|
data | Data | Data source for the route calculator. |
description? | string | A description for the route calculator. |
route | string | A name for the route calculator. |
dataSource
Type:
Data
Data source for the route calculator.
description?
Type:
string
(optional, default: no description)
A description for the route calculator.
routeCalculatorName?
Type:
string
(optional, default: A name is automatically generated)
A name for the route calculator.
Must be between 1 and 100 characters and contain only alphanumeric characters, hyphens, periods and underscores.
Properties
Name | Type | Description |
---|---|---|
env | Resource | The environment this resource belongs to. |
node | Node | The tree node. |
route | string | The Amazon Resource Name (ARN) of the route calculator resource. |
route | string | The timestamp for when the route calculator resource was created in ISO 8601 format. |
route | string | The name of the route calculator. |
route | string | The timestamp for when the route calculator resource was last updated in ISO 8601 format. |
stack | Stack | The stack in which this resource is defined. |
env
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
node
Type:
Node
The tree node.
routeCalculatorArn
Type:
string
The Amazon Resource Name (ARN) of the route calculator resource.
routeCalculatorCreateTime
Type:
string
The timestamp for when the route calculator resource was created in ISO 8601 format.
routeCalculatorName
Type:
string
The name of the route calculator.
routeCalculatorUpdateTime
Type:
string
The timestamp for when the route calculator resource was last updated in ISO 8601 format.
stack
Type:
Stack
The stack in which this resource is defined.
Methods
Name | Description |
---|---|
apply | Apply the given removal policy to this resource. |
grant(grantee, ...actions) | Grant the given principal identity permissions to perform the actions on this route calculator. |
grant | Grant the given identity permissions to access to a route calculator resource to calculate a route. |
to | Returns a string representation of this construct. |
static from | Use an existing route calculator by ARN. |
static from | Use an existing route calculator by name. |
applyRemovalPolicy(policy)
public applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
Removal
Policy
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN
).
grant(grantee, ...actions)
public grant(grantee: IGrantable, ...actions: string[]): Grant
Parameters
- grantee
IGrantable
- actions
string
Returns
Grant the given principal identity permissions to perform the actions on this route calculator.
grantRead(grantee)
public grantRead(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Grant the given identity permissions to access to a route calculator resource to calculate a route.
toString()
public toString(): string
Returns
string
Returns a string representation of this construct.
static fromRouteCalculatorArn(scope, id, routeCalculatorArn)
public static fromRouteCalculatorArn(scope: Construct, id: string, routeCalculatorArn: string): IRouteCalculator
Parameters
- scope
Construct
- id
string
- routeCalculatorArn
string
Returns
Use an existing route calculator by ARN.
static fromRouteCalculatorName(scope, id, routeCalculatorName)
public static fromRouteCalculatorName(scope: Construct, id: string, routeCalculatorName: string): IRouteCalculator
Parameters
- scope
Construct
- id
string
- routeCalculatorName
string
Returns
Use an existing route calculator by name.