import { Command as $Command } from "@smithy/smithy-client"; import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { LocationClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../LocationClient"; import { CalculateRouteMatrixRequest, CalculateRouteMatrixResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link CalculateRouteMatrixCommand}. */ export interface CalculateRouteMatrixCommandInput extends CalculateRouteMatrixRequest { } /** * @public * * The output of {@link CalculateRouteMatrixCommand}. */ export interface CalculateRouteMatrixCommandOutput extends CalculateRouteMatrixResponse, __MetadataBearer { } declare const CalculateRouteMatrixCommand_base: { new (input: CalculateRouteMatrixCommandInput): import("@smithy/smithy-client").CommandImpl; new (input: CalculateRouteMatrixCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

* Calculates a route * matrix given the following required parameters: * DeparturePositions and DestinationPositions. * CalculateRouteMatrix calculates routes and returns the travel time and * travel distance from each departure position to each destination position in the * request. For example, given departure positions A and B, and destination positions X and * Y, CalculateRouteMatrix will return time and distance for routes from A to * X, A to Y, B to X, and B to Y (in that order). The number of results returned (and * routes calculated) will be the number of DeparturePositions times the * number of DestinationPositions.

* *

Your account is charged for each route calculated, not the number of * requests.

*
*

Requires that you first create a * route calculator resource.

*

By default, a request that doesn't specify a departure time uses the best time of day * to travel with the best traffic conditions when calculating routes.

*

Additional options include:

* * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { LocationClient, CalculateRouteMatrixCommand } from "@aws-sdk/client-location"; // ES Modules import * // const { LocationClient, CalculateRouteMatrixCommand } = require("@aws-sdk/client-location"); // CommonJS import * const client = new LocationClient(config); * const input = { // CalculateRouteMatrixRequest * CalculatorName: "STRING_VALUE", // required * DeparturePositions: [ // PositionList // required * [ // Position * Number("double"), * ], * ], * DestinationPositions: [ // required * [ * Number("double"), * ], * ], * TravelMode: "STRING_VALUE", * DepartureTime: new Date("TIMESTAMP"), * DepartNow: true || false, * DistanceUnit: "STRING_VALUE", * CarModeOptions: { // CalculateRouteCarModeOptions * AvoidFerries: true || false, * AvoidTolls: true || false, * }, * TruckModeOptions: { // CalculateRouteTruckModeOptions * AvoidFerries: true || false, * AvoidTolls: true || false, * Dimensions: { // TruckDimensions * Length: Number("double"), * Height: Number("double"), * Width: Number("double"), * Unit: "STRING_VALUE", * }, * Weight: { // TruckWeight * Total: Number("double"), * Unit: "STRING_VALUE", * }, * }, * Key: "STRING_VALUE", * }; * const command = new CalculateRouteMatrixCommand(input); * const response = await client.send(command); * // { // CalculateRouteMatrixResponse * // RouteMatrix: [ // RouteMatrix // required * // [ // RouteMatrixRow * // { // RouteMatrixEntry * // Distance: Number("double"), * // DurationSeconds: Number("double"), * // Error: { // RouteMatrixEntryError * // Code: "STRING_VALUE", // required * // Message: "STRING_VALUE", * // }, * // }, * // ], * // ], * // SnappedDeparturePositions: [ // PositionList * // [ // Position * // Number("double"), * // ], * // ], * // SnappedDestinationPositions: [ * // [ * // Number("double"), * // ], * // ], * // Summary: { // CalculateRouteMatrixSummary * // DataSource: "STRING_VALUE", // required * // RouteCount: Number("int"), // required * // ErrorCount: Number("int"), // required * // DistanceUnit: "STRING_VALUE", // required * // }, * // }; * * ``` * * @param CalculateRouteMatrixCommandInput - {@link CalculateRouteMatrixCommandInput} * @returns {@link CalculateRouteMatrixCommandOutput} * @see {@link CalculateRouteMatrixCommandInput} for command's `input` shape. * @see {@link CalculateRouteMatrixCommandOutput} for command's `response` shape. * @see {@link LocationClientResolvedConfig | config} for LocationClient's `config` shape. * * @throws {@link AccessDeniedException} (client fault) *

The request was denied because of insufficient access or permissions. Check with an * administrator to verify your permissions.

* * @throws {@link InternalServerException} (server fault) *

The request has failed to process because of an unknown server error, exception, or failure.

* * @throws {@link ResourceNotFoundException} (client fault) *

The resource that you've entered was not found in your AWS account.

* * @throws {@link ThrottlingException} (client fault) *

The request was denied because of request throttling.

* * @throws {@link ValidationException} (client fault) *

The input failed to meet the constraints specified by the AWS service.

* * @throws {@link LocationServiceException} *

Base exception class for all service exceptions from Location service.

* * * @public */ export declare class CalculateRouteMatrixCommand extends CalculateRouteMatrixCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: CalculateRouteMatrixRequest; output: CalculateRouteMatrixResponse; }; sdk: { input: CalculateRouteMatrixCommandInput; output: CalculateRouteMatrixCommandOutput; }; }; }