public class CreateRouteRequest extends AmazonWebServiceRequest implements Serializable, DryRunSupportedRequest<CreateRouteRequest>
CreateRoute operation
.
Creates a route in a route table within a VPC.
You must specify one of the following targets: Internet gateway, NAT instance, or network interface.
When determining how to route traffic, we use the route with the most specific match. For example, let's say the traffic is destined for
192.0.2.3
, and the route table includes the following two routes:
192.0.2.0/24
(goes to some target A)
192.0.2.0/28
(goes to some target B)
Both routes apply to the traffic destined for 192.0.2.3
. However, the second route in the list covers a smaller number of IP addresses
and is therefore more specific, so we use that route to determine where to target the traffic.
For more information about route tables, see Route Tables in the Amazon Virtual Private Cloud User Guide .
Constructor and Description |
---|
CreateRouteRequest() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getDestinationCidrBlock()
The CIDR address block used for the destination match.
|
Request<CreateRouteRequest> |
getDryRunRequest()
This method is intended for internal use only.
|
String |
getGatewayId()
The ID of an Internet gateway attached to your VPC.
|
String |
getInstanceId()
The ID of a NAT instance in your VPC.
|
String |
getNetworkInterfaceId()
The ID of a network interface.
|
String |
getRouteTableId()
The ID of the route table for the route.
|
int |
hashCode() |
void |
setDestinationCidrBlock(String destinationCidrBlock)
The CIDR address block used for the destination match.
|
void |
setGatewayId(String gatewayId)
The ID of an Internet gateway attached to your VPC.
|
void |
setInstanceId(String instanceId)
The ID of a NAT instance in your VPC.
|
void |
setNetworkInterfaceId(String networkInterfaceId)
The ID of a network interface.
|
void |
setRouteTableId(String routeTableId)
The ID of the route table for the route.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
CreateRouteRequest |
withDestinationCidrBlock(String destinationCidrBlock)
The CIDR address block used for the destination match.
|
CreateRouteRequest |
withGatewayId(String gatewayId)
The ID of an Internet gateway attached to your VPC.
|
CreateRouteRequest |
withInstanceId(String instanceId)
The ID of a NAT instance in your VPC.
|
CreateRouteRequest |
withNetworkInterfaceId(String networkInterfaceId)
The ID of a network interface.
|
CreateRouteRequest |
withRouteTableId(String routeTableId)
The ID of the route table for the route.
|
copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setRequestCredentials, setRequestMetricCollector, withRequestMetricCollector
public String getRouteTableId()
public void setRouteTableId(String routeTableId)
routeTableId
- The ID of the route table for the route.public CreateRouteRequest withRouteTableId(String routeTableId)
Returns a reference to this object so that method calls can be chained together.
routeTableId
- The ID of the route table for the route.public String getDestinationCidrBlock()
public void setDestinationCidrBlock(String destinationCidrBlock)
destinationCidrBlock
- The CIDR address block used for the destination match. Routing
decisions are based on the most specific match.public CreateRouteRequest withDestinationCidrBlock(String destinationCidrBlock)
Returns a reference to this object so that method calls can be chained together.
destinationCidrBlock
- The CIDR address block used for the destination match. Routing
decisions are based on the most specific match.public String getGatewayId()
public void setGatewayId(String gatewayId)
gatewayId
- The ID of an Internet gateway attached to your VPC.public CreateRouteRequest withGatewayId(String gatewayId)
Returns a reference to this object so that method calls can be chained together.
gatewayId
- The ID of an Internet gateway attached to your VPC.public String getInstanceId()
public void setInstanceId(String instanceId)
instanceId
- The ID of a NAT instance in your VPC. The operation fails if you
specify an instance ID unless exactly one network interface is
attached.public CreateRouteRequest withInstanceId(String instanceId)
Returns a reference to this object so that method calls can be chained together.
instanceId
- The ID of a NAT instance in your VPC. The operation fails if you
specify an instance ID unless exactly one network interface is
attached.public String getNetworkInterfaceId()
public void setNetworkInterfaceId(String networkInterfaceId)
networkInterfaceId
- The ID of a network interface.public CreateRouteRequest withNetworkInterfaceId(String networkInterfaceId)
Returns a reference to this object so that method calls can be chained together.
networkInterfaceId
- The ID of a network interface.public Request<CreateRouteRequest> getDryRunRequest()
getDryRunRequest
in interface DryRunSupportedRequest<CreateRouteRequest>
public String toString()
toString
in class Object
Object.toString()
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.