EC2.RouteTable.
associate_with_subnet
(**kwargs)¶Associates a subnet in your VPC or an internet gateway or virtual private gateway attached to your VPC with a route table in your VPC. This association causes traffic from the subnet or gateway to be routed according to the routes in the route table. The action returns an association ID, which you need in order to disassociate the route table later. A route table can be associated with multiple subnets.
For more information, see Route tables in the Amazon Virtual Private Cloud User Guide .
See also: AWS API Documentation
Request Syntax
route_table_association = route_table.associate_with_subnet(
DryRun=True|False,
SubnetId='string',
GatewayId='string'
)
DryRunOperation
. Otherwise, it is UnauthorizedOperation
.ec2.RouteTableAssociation
RouteTableAssociation resource