Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ReplaceRouteCommand

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.

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);
see

ReplaceRouteCommandInput for command's input shape.

see

ReplaceRouteCommandOutput for command's response shape.

see

config for EC2Client's config shape.

Hierarchy

Implements

Index

Constructors

constructor

Properties

Readonly input

input: ReplaceRouteCommandInput

Readonly middlewareStack

middlewareStack: IMiddlewareStack<ReplaceRouteCommandInput, ReplaceRouteCommandOutput>

Methods

Static getEndpointParameterInstructions