ReplaceRoute
In this article:
ReplaceRoute#
Description#
Replaces an existing route within a route table in a VPC.
Request Parameters#
Required parameters#
DestinationCidrBlock — The CIDR address block used for the destination match.
Type: String
Required: Yes
RouteTableId — The ID of the route table.
Type: String
Required: Yes
Optional parameters#
GatewayId – The gateway (VPN or Internet gateway) ID.
Type: String
Required: No
instanceId — The ID of the instance.
Type: String
Required: No
NetworkInterfaceId — The ID of the network interface.
Type: String
Required: No
Response Elements#
requestId — The request ID
Type: String
return —
True
is returned if the request succeeds and an error otherwise.Type: Boolean
Examples#
c2-ec2 ReplaceRoute RouteTableId rtb-12345678 DestinationCidrBlock 10.10.10.0/24 GatewayId vpn-12345678
c2-ec2 ReplaceRoute RouteTableId rtb-12345678 DestinationCidrBlock 10.10.10.0/24 NetworkInterfaceId eni-12345678
c2-ec2 ReplaceRoute RouteTableId rtb-12345678 DestinationCidrBlock 10.10.10.0/24 eni-12345678