% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ec2_operations.R
\name{ec2_replace_route}
\alias{ec2_replace_route}
\title{Replaces an existing route within a route table in a VPC}
\usage{
ec2_replace_route(DestinationCidrBlock, DestinationIpv6CidrBlock,
  DestinationPrefixListId, DryRun, VpcEndpointId,
  EgressOnlyInternetGatewayId, GatewayId, InstanceId, LocalTarget,
  NatGatewayId, TransitGatewayId, LocalGatewayId, CarrierGatewayId,
  NetworkInterfaceId, RouteTableId, VpcPeeringConnectionId)
}
\arguments{
\item{DestinationCidrBlock}{The IPv4 CIDR address block used for the destination match. The value
that you provide must match the CIDR of an existing route in the table.}

\item{DestinationIpv6CidrBlock}{The IPv6 CIDR address block used for the destination match. The value
that you provide must match the CIDR of an existing route in the table.}

\item{DestinationPrefixListId}{The ID of the prefix list for the route.}

\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{VpcEndpointId}{The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints
only.}

\item{EgressOnlyInternetGatewayId}{[IPv6 traffic only] The ID of an egress-only internet gateway.}

\item{GatewayId}{The ID of an internet gateway or virtual private gateway.}

\item{InstanceId}{The ID of a NAT instance in your VPC.}

\item{LocalTarget}{Specifies whether to reset the local route to its default target
(\code{local}).}

\item{NatGatewayId}{[IPv4 traffic only] The ID of a NAT gateway.}

\item{TransitGatewayId}{The ID of a transit gateway.}

\item{LocalGatewayId}{The ID of the local gateway.}

\item{CarrierGatewayId}{[IPv4 traffic only] The ID of a carrier gateway.}

\item{NetworkInterfaceId}{The ID of a network interface.}

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

\item{VpcPeeringConnectionId}{The ID of a VPC peering connection.}
}
\value{
An empty list.
}
\description{
Replaces an existing route within a route table in a VPC. You must
provide only one of the following: internet gateway, virtual private
gateway, NAT instance, NAT gateway, VPC peering connection, network
interface, egress-only internet gateway, or transit gateway.

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$replace_route(
  DestinationCidrBlock = "string",
  DestinationIpv6CidrBlock = "string",
  DestinationPrefixListId = "string",
  DryRun = TRUE|FALSE,
  VpcEndpointId = "string",
  EgressOnlyInternetGatewayId = "string",
  GatewayId = "string",
  InstanceId = "string",
  LocalTarget = TRUE|FALSE,
  NatGatewayId = "string",
  TransitGatewayId = "string",
  LocalGatewayId = "string",
  CarrierGatewayId = "string",
  NetworkInterfaceId = "string",
  RouteTableId = "string",
  VpcPeeringConnectionId = "string"
)
}
}

\examples{
\dontrun{
# This example replaces the specified route in the specified table table.
# The new route matches the specified CIDR and sends the traffic to the
# specified virtual private gateway.
svc$replace_route(
  DestinationCidrBlock = "10.0.0.0/16",
  GatewayId = "vgw-9a4cacf3",
  RouteTableId = "rtb-22574640"
)
}

}
\keyword{internal}
