| Did this page help you? Yes No Tell us about it... |
Replaces an existing route within a route table in a VPC. For more information about route tables, go to Route Tables in the Amazon Virtual Private Cloud User Guide.
| Name | Description | Required |
|---|---|---|
|
|
The ID of the route table where the route will be replaced. Type: String Default: None |
Yes |
DestinationCidrBlock
|
The CIDR address block used for the destination match. For example: 0.0.0.0/0. The value you provide must match the CIDR of an existing route in the table. Type: String Default: None | Yes |
GatewayId
|
The ID of a gateway attached to your VPC. Type: String Default: None Condition: You must provide only one of the following: a |
Conditional |
InstanceId
|
The ID of a NAT instance in your VPC. Type: String Default: None Condition: You must provide only one of the following: a |
Conditional |
|
|
Allow routing to network interface attachments. Type: String Default: None Condition: You must provide only one of the following: |
Conditional |
The elements in the following table are wrapped in a
ReplaceRouteResponse structure.
| Name | Description |
|---|---|
|
|
The ID of the request. Type: String |
|
|
Returns true if the request succeeds. Otherwise, returns an error. Type: xsd:boolean |
This example replaces a route in the route table with ID rtb-e4ad488d. The new route matches the CIDR 10.0.0.0/8 and sends the traffic to the virtual private gateway with ID vgw-1d00376e.
https://ec2.amazonaws.com/?Action=ReplaceRoute &RouteTableId=rtb-e4ad488d &DestinationCidrBlock=10.0.0.0/8 &GatewayId=vgw-1d00376e &AUTHPARAMS
<ReplaceRouteResponse xmlns="http://ec2.amazonaws.com/doc/2012-04-01/"> <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId> <return>true</return> </ReplaceRouteResponse>