Route / Action / replace

replace#

EC2.Route.replace(**kwargs)#

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.

See also: AWS API Documentation

Request Syntax

response = route.replace(
    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',
    VpcPeeringConnectionId='string',
    CoreNetworkArn='string'
)
Parameters:
  • DestinationIpv6CidrBlock (string) – 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.

  • DestinationPrefixListId (string) – The ID of the prefix list for the route.

  • DryRun (boolean) – 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.

  • VpcEndpointId (string) – The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.

  • EgressOnlyInternetGatewayId (string) – [IPv6 traffic only] The ID of an egress-only internet gateway.

  • GatewayId (string) – The ID of an internet gateway or virtual private gateway.

  • InstanceId (string) – The ID of a NAT instance in your VPC.

  • LocalTarget (boolean) – Specifies whether to reset the local route to its default target ( local).

  • NatGatewayId (string) – [IPv4 traffic only] The ID of a NAT gateway.

  • TransitGatewayId (string) – The ID of a transit gateway.

  • LocalGatewayId (string) – The ID of the local gateway.

  • CarrierGatewayId (string) – [IPv4 traffic only] The ID of a carrier gateway.

  • NetworkInterfaceId (string) – The ID of a network interface.

  • VpcPeeringConnectionId (string) – The ID of a VPC peering connection.

  • CoreNetworkArn (string) – The Amazon Resource Name (ARN) of the core network.

Returns:

None