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 Virtual Private Cloud User Guide.
example
Use a bare-bones client and the command you need to make an API call.
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 Virtual Private Cloud User Guide.
Use a bare-bones client and the command you need to make an API call.
import { EC2Client, ReplaceRouteCommand } from "@aws-sdk/client-ec2"; // ES Modules import // const { EC2Client, ReplaceRouteCommand } = require("@aws-sdk/client-ec2"); // CommonJS import const client = new EC2Client(config); const command = new ReplaceRouteCommand(input); const response = await client.send(command);
ReplaceRouteCommandInput for command's
input
shape.ReplaceRouteCommandOutput for command's
response
shape.config for EC2Client's
config
shape.