Skip to content

/AWS1/CL_EC2=>REPLACEROUTE()

About ReplaceRoute

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.

Method Signature

IMPORTING

Required arguments:

IV_ROUTETABLEID TYPE /AWS1/EC2ROUTETABLEID /AWS1/EC2ROUTETABLEID

The ID of the route table.

Optional arguments:

IV_DESTINATIONCIDRBLOCK TYPE /AWS1/EC2STRING /AWS1/EC2STRING

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.

IV_DESTINATIONIPV6CIDRBLOCK TYPE /AWS1/EC2STRING /AWS1/EC2STRING

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.

IV_DESTINATIONPREFIXLISTID TYPE /AWS1/EC2PREFIXLISTRESOURCEID /AWS1/EC2PREFIXLISTRESOURCEID

The ID of the prefix list for the route.

IV_DRYRUN TYPE /AWS1/EC2BOOLEAN /AWS1/EC2BOOLEAN

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 DryRunOperation. Otherwise, it is UnauthorizedOperation.

IV_VPCENDPOINTID TYPE /AWS1/EC2VPCENDPOINTID /AWS1/EC2VPCENDPOINTID

The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.

IV_EGRESSONLYINTERNETGWID TYPE /AWS1/EC2EGRONLYINTERNETGWID /AWS1/EC2EGRONLYINTERNETGWID

[IPv6 traffic only] The ID of an egress-only internet gateway.

IV_GATEWAYID TYPE /AWS1/EC2ROUTEGATEWAYID /AWS1/EC2ROUTEGATEWAYID

The ID of an internet gateway or virtual private gateway.

IV_INSTANCEID TYPE /AWS1/EC2INSTANCEID /AWS1/EC2INSTANCEID

The ID of a NAT instance in your VPC.

IV_LOCALTARGET TYPE /AWS1/EC2BOOLEAN /AWS1/EC2BOOLEAN

Specifies whether to reset the local route to its default target (local).

IV_NATGATEWAYID TYPE /AWS1/EC2NATGATEWAYID /AWS1/EC2NATGATEWAYID

[IPv4 traffic only] The ID of a NAT gateway.

IV_TRANSITGATEWAYID TYPE /AWS1/EC2TRANSITGATEWAYID /AWS1/EC2TRANSITGATEWAYID

The ID of a transit gateway.

IV_LOCALGATEWAYID TYPE /AWS1/EC2LOCALGATEWAYID /AWS1/EC2LOCALGATEWAYID

The ID of the local gateway.

IV_CARRIERGATEWAYID TYPE /AWS1/EC2CARRIERGATEWAYID /AWS1/EC2CARRIERGATEWAYID

[IPv4 traffic only] The ID of a carrier gateway.

IV_NETWORKINTERFACEID TYPE /AWS1/EC2NETWORKINTERFACEID /AWS1/EC2NETWORKINTERFACEID

The ID of a network interface.

IV_VPCPEERINGCONNECTIONID TYPE /AWS1/EC2VPCPEERINGCONNID /AWS1/EC2VPCPEERINGCONNID

The ID of a VPC peering connection.

IV_CORENETWORKARN TYPE /AWS1/EC2CORENETWORKARN /AWS1/EC2CORENETWORKARN

The Amazon Resource Name (ARN) of the core network.