% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ec2_operations.R
\name{ec2_associate_route_table}
\alias{ec2_associate_route_table}
\title{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}
\usage{
ec2_associate_route_table(DryRun, RouteTableId, SubnetId, GatewayId)
}
\arguments{
\item{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 \code{DryRunOperation}.
Otherwise, it is \code{UnauthorizedOperation}.}

\item{RouteTableId}{[required] The ID of the route table.}

\item{SubnetId}{The ID of the subnet.}

\item{GatewayId}{The ID of the internet gateway or virtual private gateway.}
}
\value{
A list with the following syntax:\preformatted{list(
  AssociationId = "string",
  AssociationState = list(
    State = "associating"|"associated"|"disassociating"|"disassociated"|"failed",
    StatusMessage = "string"
  )
)
}
}
\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 \href{https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html}{Route Tables}
in the \emph{Amazon Virtual Private Cloud User Guide}.
}
\section{Request syntax}{
\preformatted{svc$associate_route_table(
  DryRun = TRUE|FALSE,
  RouteTableId = "string",
  SubnetId = "string",
  GatewayId = "string"
)
}
}

\examples{
\dontrun{
# This example associates the specified route table with the specified
# subnet.
svc$associate_route_table(
  RouteTableId = "rtb-22574640",
  SubnetId = "subnet-9d4a7b6"
)
}

}
\keyword{internal}
