CreateRoute

GET /?Action=CreateRoute
Description

Creates a route in a specified route table within a specified VPC.
You must specify one of the following elements as the target:

  • VPC peering connection

  • NAT instance

  • Internet gateway

  • Virtual private gateway

  • NAT gateway

  • Network interface

The routing algorithm is based on the most specific match.

Body parameter

Required: false
Name: CreateRouteRequest

Name Description Required Schema Default Example

DestinationCidrBlock

The CIDR block used for the destination match.

true

string

GatewayId

The ID of an Internet gateway or virtual private gateway attached to your VPC.

false

string

InstanceId

The ID of a NAT instance in your VPC (attached to exactly one network interface).

false

string

NatGatewayId

The ID of a NAT gateway.

false

string

NetworkInterfaceId

The ID of a network interface.

false

string

RouteTableId

The ID of the route table.

true

string

VpcPeeringConnectionId

The ID of a VPC peering connection.

false

string

Responses
HTTP Code 200
HTTP Code Description Schema

200

CreateRouteResult

Response 200

Response 200

Name Description Required Schema Default Example

requestId

The ID of the request.

false

string

return

If true, the request succeeded. Otherwise, an error is returned.

false

boolean