Associate Route Table
| ec2_associate_route_table | R Documentation |
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¶
Description¶
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 VPC User Guide.
Usage¶
ec2_associate_route_table(GatewayId, PublicIpv4Pool, DryRun, SubnetId,
RouteTableId)
Arguments¶
GatewayId |
The ID of the internet gateway or virtual private gateway. |
PublicIpv4Pool |
The ID of a public IPv4 pool. A public IPv4 pool is a pool of IPv4 addresses that you've brought to Amazon Web Services with BYOIP. |
DryRun |
Checks whether you have the required permissions for the action,
without actually making the request, and provides an error response. If
you have the required permissions, the error response is
|
SubnetId |
The ID of the subnet. |
RouteTableId |
[required] The ID of the route table. |
Value¶
A list with the following syntax:
list(
AssociationId = "string",
AssociationState = list(
State = "associating"|"associated"|"disassociating"|"disassociated"|"failed",
StatusMessage = "string"
)
)
Request syntax¶
svc$associate_route_table(
GatewayId = "string",
PublicIpv4Pool = "string",
DryRun = TRUE|FALSE,
SubnetId = "string",
RouteTableId = "string"
)
Examples¶
## Not run:
# This example associates the specified route table with the specified
# subnet.
svc$associate_route_table(
RouteTableId = "rtb-22574640",
SubnetId = "subnet-9d4a7b6"
)
## End(Not run)