| « PreviousNext » | |
![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
Creates a route table within a VPC. After you create a new route table, you can add routes and associate the table with a subnet. For more information about route tables, see Route Tables in the Amazon Virtual Private Cloud User Guide.
VpcIdThe ID of the VPC.
Type: String
Default: None
Required: Yes
The following elements are returned in a
CreateRouteTableResponse element.
requestIdThe ID of the request.
Type: xsd:string
routeTableInformation about the newly created route table.
Type: RouteTableType
This example creates a route table within the VPC with ID of vpc-11ad4878.
https://ec2.amazonaws.com/?Action=CreateRouteTable &VpcId=vpc-11ad4878 &AUTHPARAMS
By default, every route table includes a local route that enables traffic to flow within the VPC. The following response shows that route.
CreateRouteTableResponse xmlns="http://ec2.amazonaws.com/doc/2013-02-01 /">
<requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>
<routeTable>
<routeTableId>rtb-f9ad4890</routeTableId>
<vpcId>vpc-11ad4878</vpcId>
<routeSet>
<item>
<destinationCidrBlock>10.0.0.0/22</destinationCidrBlock>
<gatewayId>local</gatewayId>
<state>active</state>
</item>
</routeSet>
<associationSet/>
<tagSet/>
</routeTable>
</CreateRouteTableResponse>