Skip to content
v2.277.0

Experimental

@aws-cdk/aws-location-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

AllowRoutesAction Enum ​

Actions for Routes that an API key resource grants permissions to perform.

Example ​

ts
new location.ApiKey(this, 'APIKeyAny', {
  // specify allowed actions
  allowMapsActions: [
    location.AllowMapsAction.GET_STATIC_MAP,
  ],
  allowPlacesActions: [
    location.AllowPlacesAction.GET_PLACE,
  ],
  allowRoutesActions: [
    location.AllowRoutesAction.CALCULATE_ISOLINES,
  ],
});
python
location.ApiKey(self, "APIKeyAny",
    # specify allowed actions
    allow_maps_actions=[location.AllowMapsAction.GET_STATIC_MAP
    ],
    allow_places_actions=[location.AllowPlacesAction.GET_PLACE
    ],
    allow_routes_actions=[location.AllowRoutesAction.CALCULATE_ISOLINES
    ]
)
java
ApiKey.Builder.create(this, "APIKeyAny")
        // specify allowed actions
        .allowMapsActions(List.of(AllowMapsAction.GET_STATIC_MAP))
        .allowPlacesActions(List.of(AllowPlacesAction.GET_PLACE))
        .allowRoutesActions(List.of(AllowRoutesAction.CALCULATE_ISOLINES))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.Location.Alpha
new ApiKey(this, "APIKeyAny", new ApiKeyProps {
    // specify allowed actions
    AllowMapsActions = new [] { AllowMapsAction.GET_STATIC_MAP },
    AllowPlacesActions = new [] { AllowPlacesAction.GET_PLACE },
    AllowRoutesActions = new [] { AllowRoutesAction.CALCULATE_ISOLINES }
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdklocationalpha/v2
location.NewApiKey(this, jsii.String("APIKeyAny"), &ApiKeyProps{
	// specify allowed actions
	AllowMapsActions: []AllowMapsAction{
		location.AllowMapsAction_GET_STATIC_MAP,
	},
	AllowPlacesActions: []AllowPlacesAction{
		location.AllowPlacesAction_GET_PLACE,
	},
	AllowRoutesActions: []AllowRoutesAction{
		location.AllowRoutesAction_CALCULATE_ISOLINES,
	},
})

Members ​

MemberDescription
CALCULATE_ISOLINESAllows isoline calculation.
CALCULATE_ROUTESAllows point to point routing.
CALCULATE_ROUTE_MATRIXAllows matrix routing.
OPTIMIZE_WAYPOINTSAllows computing the best sequence of waypoints.
SNAP_TO_ROADSAllows snapping GPS points to a likely route.
ANYAllows any routes actions.

Referenced by ​

  • ApiKeyProps.allowRoutesActionsallow_routes_actionsallowRoutesActionsAllowRoutesActionsAllowRoutesActions