Replaces an existing route within a route table in a VPC¶
Description¶
Replaces an existing route within a route table in a VPC.
You must specify either a destination CIDR block or a prefix list ID. You must also specify exactly one of the resources from the parameter list, or reset the local route to its default target.
For more information, see Route tables in the Amazon VPC User Guide.
Usage¶
ec2_replace_route(DestinationPrefixListId, VpcEndpointId, LocalTarget,
TransitGatewayId, LocalGatewayId, CarrierGatewayId, CoreNetworkArn,
OdbNetworkArn, DryRun, RouteTableId, DestinationCidrBlock, GatewayId,
DestinationIpv6CidrBlock, EgressOnlyInternetGatewayId, InstanceId,
NetworkInterfaceId, VpcPeeringConnectionId, NatGatewayId)
Arguments¶
-
DestinationPrefixListIdThe ID of the prefix list for the route.
-
VpcEndpointIdThe ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.
-
LocalTargetSpecifies whether to reset the local route to its default target (
local). -
TransitGatewayIdThe ID of a transit gateway.
-
LocalGatewayIdThe ID of the local gateway.
-
CarrierGatewayId[IPv4 traffic only] The ID of a carrier gateway.
-
CoreNetworkArnThe Amazon Resource Name (ARN) of the core network.
-
OdbNetworkArnThe Amazon Resource Name (ARN) of the ODB network.
-
DryRunChecks 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
DryRunOperation. Otherwise, it isUnauthorizedOperation. -
RouteTableId[required] The ID of the route table.
-
DestinationCidrBlockThe 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.
-
GatewayIdThe ID of an internet gateway or virtual private gateway.
-
DestinationIpv6CidrBlockThe 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.
-
EgressOnlyInternetGatewayId[IPv6 traffic only] The ID of an egress-only internet gateway.
-
InstanceIdThe ID of a NAT instance in your VPC.
-
NetworkInterfaceIdThe ID of a network interface.
-
VpcPeeringConnectionIdThe ID of a VPC peering connection.
-
NatGatewayId[IPv4 traffic only] The ID of a NAT gateway.
Value¶
An empty list.
Request syntax¶
svc$replace_route(
DestinationPrefixListId = "string",
VpcEndpointId = "string",
LocalTarget = TRUE|FALSE,
TransitGatewayId = "string",
LocalGatewayId = "string",
CarrierGatewayId = "string",
CoreNetworkArn = "string",
OdbNetworkArn = "string",
DryRun = TRUE|FALSE,
RouteTableId = "string",
DestinationCidrBlock = "string",
GatewayId = "string",
DestinationIpv6CidrBlock = "string",
EgressOnlyInternetGatewayId = "string",
InstanceId = "string",
NetworkInterfaceId = "string",
VpcPeeringConnectionId = "string",
NatGatewayId = "string"
)