| Did this page help you? Yes No Tell us about it... |
Associates a subnet with a route table. The subnet and route table must be in the same VPC. This association causes traffic originating from the subnet to be routed according to the routes in the route table. The action returns an association ID, which you need if you want to disassociate the route table from the subnet later. A route table can be associated with multiple subnets.
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. Type: String Default: None |
Yes |
|
|
The ID of the subnet. Type: String Default: None |
Yes |
The elements in the following table are wrapped in an
AssociateRouteTableResponse structure.
| Name | Description |
|---|---|
|
|
The ID of the request. Type: String |
|
|
ID that AWS provides to represent the association of the route table and the subnet. Type: String Example: rtbassoc-f8ad4891 |
This example associates a route table with ID rtb-e4ad488d with a subnet with ID subnet-15ad487c.
https://ec2.amazonaws.com/?Action=AssociateRouteTable &RouteTableId=rtb-e4ad488d &SubnetId=subnet-15ad487c
<AssociateRouteTableResponse xmlns="http://ec2.amazonaws.com/doc/2012-04-01/"> <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId> <associationId>rtbassoc-f8ad4891</associationId> </AssociateRouteTableResponse>