paws.compute (version 0.1.0)

ec2_replace_route: 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 provide only one of the following: internet gateway or virtual private gateway, NAT instance, NAT gateway, VPC peering connection, network interface, or egress-only internet gateway.

Usage

ec2_replace_route(DestinationCidrBlock, DestinationIpv6CidrBlock,
  DryRun, EgressOnlyInternetGatewayId, GatewayId, InstanceId,
  NatGatewayId, TransitGatewayId, NetworkInterfaceId, RouteTableId,
  VpcPeeringConnectionId)

Arguments

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.

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.

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

EgressOnlyInternetGatewayId

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

GatewayId

The ID of an internet gateway or virtual private gateway.

InstanceId

The ID of a NAT instance in your VPC.

NatGatewayId

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

TransitGatewayId

The ID of a transit gateway.

NetworkInterfaceId

The ID of a network interface.

RouteTableId

[required] The ID of the route table.

VpcPeeringConnectionId

The ID of a VPC peering connection.

Request syntax

svc$replace_route(
  DestinationCidrBlock = "string",
  DestinationIpv6CidrBlock = "string",
  DryRun = TRUE|FALSE,
  EgressOnlyInternetGatewayId = "string",
  GatewayId = "string",
  InstanceId = "string",
  NatGatewayId = "string",
  TransitGatewayId = "string",
  NetworkInterfaceId = "string",
  RouteTableId = "string",
  VpcPeeringConnectionId = "string"
)

Details

For more information, see Route Tables in the Amazon Virtual Private Cloud User Guide.

Examples

Run this code
# NOT RUN {
# 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.
# }
# NOT RUN {
svc$replace_route(
  DestinationCidrBlock = "10.0.0.0/16",
  GatewayId = "vgw-9a4cacf3",
  RouteTableId = "rtb-22574640"
)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab