import { Command as $Command } from "@smithy/smithy-client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client"; import type { ReplaceRouteRequest } from "../models/models_7"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link ReplaceRouteCommand}. */ export interface ReplaceRouteCommandInput extends ReplaceRouteRequest { } /** * @public * * The output of {@link ReplaceRouteCommand}. */ export interface ReplaceRouteCommandOutput extends __MetadataBearer { } declare const ReplaceRouteCommand_base: { new (input: ReplaceRouteCommandInput): import("@smithy/smithy-client").CommandImpl; new (input: ReplaceRouteCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

Replaces an existing route within a route table in a VPC.

*

You must specify either a destination CIDR block or a prefix list ID. You must also specify * exactly one of the resources from the parameter list, or reset the local route to its default * target.

*

For more information, see Route tables in the * Amazon VPC User Guide.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { EC2Client, ReplaceRouteCommand } from "@aws-sdk/client-ec2"; // ES Modules import * // const { EC2Client, ReplaceRouteCommand } = require("@aws-sdk/client-ec2"); // CommonJS import * // import type { EC2ClientConfig } from "@aws-sdk/client-ec2"; * const config = {}; // type is EC2ClientConfig * const client = new EC2Client(config); * const input = { // ReplaceRouteRequest * DestinationPrefixListId: "STRING_VALUE", * VpcEndpointId: "STRING_VALUE", * LocalTarget: true || false, * TransitGatewayId: "STRING_VALUE", * LocalGatewayId: "STRING_VALUE", * CarrierGatewayId: "STRING_VALUE", * CoreNetworkArn: "STRING_VALUE", * OdbNetworkArn: "STRING_VALUE", * DryRun: true || false, * RouteTableId: "STRING_VALUE", // required * DestinationCidrBlock: "STRING_VALUE", * GatewayId: "STRING_VALUE", * DestinationIpv6CidrBlock: "STRING_VALUE", * EgressOnlyInternetGatewayId: "STRING_VALUE", * InstanceId: "STRING_VALUE", * NetworkInterfaceId: "STRING_VALUE", * VpcPeeringConnectionId: "STRING_VALUE", * NatGatewayId: "STRING_VALUE", * }; * const command = new ReplaceRouteCommand(input); * const response = await client.send(command); * // {}; * * ``` * * @param ReplaceRouteCommandInput - {@link ReplaceRouteCommandInput} * @returns {@link ReplaceRouteCommandOutput} * @see {@link ReplaceRouteCommandInput} for command's `input` shape. * @see {@link ReplaceRouteCommandOutput} for command's `response` shape. * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape. * * @throws {@link EC2ServiceException} *

Base exception class for all service exceptions from EC2 service.

* * * @example To replace a route * ```javascript * // This example replaces the specified route in the specified table table. The new route matches the specified CIDR and sends the traffic to the specified virtual private gateway. * const input = { * DestinationCidrBlock: "10.0.0.0/16", * GatewayId: "vgw-9a4cacf3", * RouteTableId: "rtb-22574640" * }; * const command = new ReplaceRouteCommand(input); * const response = await client.send(command); * /* response is * { /* metadata only *\/ } * *\/ * ``` * * @public */ export declare class ReplaceRouteCommand extends ReplaceRouteCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: ReplaceRouteRequest; output: {}; }; sdk: { input: ReplaceRouteCommandInput; output: ReplaceRouteCommandOutput; }; }; }