com.amazonaws.services.ec2.model
Class CreateRouteRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.ec2.model.CreateRouteRequest
All Implemented Interfaces:
DryRunSupportedRequest<CreateRouteRequest>, java.io.Serializable

public class CreateRouteRequest
extends AmazonWebServiceRequest
implements java.io.Serializable, DryRunSupportedRequest<CreateRouteRequest>

Container for the parameters to the CreateRoute operation.

Creates a route in a route table within a VPC.

You must specify one of the following targets: Internet gateway, NAT instance, VPC peering connection, 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:

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 .

See Also:
AmazonEC2.createRoute(CreateRouteRequest), Serialized Form

Constructor Summary
CreateRouteRequest()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getDestinationCidrBlock()
          The CIDR address block used for the destination match.
 Request<CreateRouteRequest> getDryRunRequest()
          This method is intended for internal use only.
 java.lang.String getGatewayId()
          The ID of an Internet gateway attached to your VPC.
 java.lang.String getInstanceId()
          The ID of a NAT instance in your VPC.
 java.lang.String getNetworkInterfaceId()
          The ID of a network interface.
 java.lang.String getRouteTableId()
          The ID of the route table for the route.
 java.lang.String getVpcPeeringConnectionId()
          The ID of a VPC peering connection.
 int hashCode()
           
 void setDestinationCidrBlock(java.lang.String destinationCidrBlock)
          The CIDR address block used for the destination match.
 void setGatewayId(java.lang.String gatewayId)
          The ID of an Internet gateway attached to your VPC.
 void setInstanceId(java.lang.String instanceId)
          The ID of a NAT instance in your VPC.
 void setNetworkInterfaceId(java.lang.String networkInterfaceId)
          The ID of a network interface.
 void setRouteTableId(java.lang.String routeTableId)
          The ID of the route table for the route.
 void setVpcPeeringConnectionId(java.lang.String vpcPeeringConnectionId)
          The ID of a VPC peering connection.
 java.lang.String toString()
          Returns a string representation of this object; useful for testing and debugging.
 CreateRouteRequest withDestinationCidrBlock(java.lang.String destinationCidrBlock)
          The CIDR address block used for the destination match.
 CreateRouteRequest withGatewayId(java.lang.String gatewayId)
          The ID of an Internet gateway attached to your VPC.
 CreateRouteRequest withInstanceId(java.lang.String instanceId)
          The ID of a NAT instance in your VPC.
 CreateRouteRequest withNetworkInterfaceId(java.lang.String networkInterfaceId)
          The ID of a network interface.
 CreateRouteRequest withRouteTableId(java.lang.String routeTableId)
          The ID of the route table for the route.
 CreateRouteRequest withVpcPeeringConnectionId(java.lang.String vpcPeeringConnectionId)
          The ID of a VPC peering connection.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setDelegationToken, setRequestCredentials, setRequestMetricCollector, withRequestMetricCollector
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CreateRouteRequest

public CreateRouteRequest()
Method Detail

getRouteTableId

public java.lang.String getRouteTableId()
The ID of the route table for the route.

Returns:
The ID of the route table for the route.

setRouteTableId

public void setRouteTableId(java.lang.String routeTableId)
The ID of the route table for the route.

Parameters:
routeTableId - The ID of the route table for the route.

withRouteTableId

public CreateRouteRequest withRouteTableId(java.lang.String routeTableId)
The ID of the route table for the route.

Returns a reference to this object so that method calls can be chained together.

Parameters:
routeTableId - The ID of the route table for the route.
Returns:
A reference to this updated object so that method calls can be chained together.

getDestinationCidrBlock

public java.lang.String getDestinationCidrBlock()
The CIDR address block used for the destination match. Routing decisions are based on the most specific match.

Returns:
The CIDR address block used for the destination match. Routing decisions are based on the most specific match.

setDestinationCidrBlock

public void setDestinationCidrBlock(java.lang.String destinationCidrBlock)
The CIDR address block used for the destination match. Routing decisions are based on the most specific match.

Parameters:
destinationCidrBlock - The CIDR address block used for the destination match. Routing decisions are based on the most specific match.

withDestinationCidrBlock

public CreateRouteRequest withDestinationCidrBlock(java.lang.String destinationCidrBlock)
The CIDR address block used for the destination match. Routing decisions are based on the most specific match.

Returns a reference to this object so that method calls can be chained together.

Parameters:
destinationCidrBlock - The CIDR address block used for the destination match. Routing decisions are based on the most specific match.
Returns:
A reference to this updated object so that method calls can be chained together.

getGatewayId

public java.lang.String getGatewayId()
The ID of an Internet gateway attached to your VPC.

Returns:
The ID of an Internet gateway attached to your VPC.

setGatewayId

public void setGatewayId(java.lang.String gatewayId)
The ID of an Internet gateway attached to your VPC.

Parameters:
gatewayId - The ID of an Internet gateway attached to your VPC.

withGatewayId

public CreateRouteRequest withGatewayId(java.lang.String gatewayId)
The ID of an Internet gateway attached to your VPC.

Returns a reference to this object so that method calls can be chained together.

Parameters:
gatewayId - The ID of an Internet gateway attached to your VPC.
Returns:
A reference to this updated object so that method calls can be chained together.

getInstanceId

public java.lang.String getInstanceId()
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.

Returns:
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.

setInstanceId

public void setInstanceId(java.lang.String 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.

Parameters:
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.

withInstanceId

public CreateRouteRequest withInstanceId(java.lang.String 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.

Returns a reference to this object so that method calls can be chained together.

Parameters:
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.
Returns:
A reference to this updated object so that method calls can be chained together.

getNetworkInterfaceId

public java.lang.String getNetworkInterfaceId()
The ID of a network interface.

Returns:
The ID of a network interface.

setNetworkInterfaceId

public void setNetworkInterfaceId(java.lang.String networkInterfaceId)
The ID of a network interface.

Parameters:
networkInterfaceId - The ID of a network interface.

withNetworkInterfaceId

public CreateRouteRequest withNetworkInterfaceId(java.lang.String networkInterfaceId)
The ID of a network interface.

Returns a reference to this object so that method calls can be chained together.

Parameters:
networkInterfaceId - The ID of a network interface.
Returns:
A reference to this updated object so that method calls can be chained together.

getVpcPeeringConnectionId

public java.lang.String getVpcPeeringConnectionId()
The ID of a VPC peering connection.

Returns:
The ID of a VPC peering connection.

setVpcPeeringConnectionId

public void setVpcPeeringConnectionId(java.lang.String vpcPeeringConnectionId)
The ID of a VPC peering connection.

Parameters:
vpcPeeringConnectionId - The ID of a VPC peering connection.

withVpcPeeringConnectionId

public CreateRouteRequest withVpcPeeringConnectionId(java.lang.String vpcPeeringConnectionId)
The ID of a VPC peering connection.

Returns a reference to this object so that method calls can be chained together.

Parameters:
vpcPeeringConnectionId - The ID of a VPC peering connection.
Returns:
A reference to this updated object so that method calls can be chained together.

getDryRunRequest

public Request<CreateRouteRequest> getDryRunRequest()
This method is intended for internal use only. Returns the marshaled request configured with additional parameters to enable operation dry-run.

Specified by:
getDryRunRequest in interface DryRunSupportedRequest<CreateRouteRequest>

toString

public java.lang.String toString()
Returns a string representation of this object; useful for testing and debugging.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.