AssociateRouteTable#

Description#

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 ubnet to be routed according to the routes in the route table.

Request Parameters#

  • RouteTableId — The ID of the route table.

    • Required: Yes

    • Type: String

  • SubnetId — The ID of the subnet

    • Required: Yes

    • Type: String

Response Elements#

  • associationId — The ID of the association.

    • Type: String

  • requestId — The request ID

    • Type: String

  • returnTrue is returned if the request succeeds and an error otherwise.

    • Type: Boolean

Examples#

c2-ec2 AssociateRouteTable RouteTableId rtb-12345678 SubnetId subnet-12345678