Did this page help you?

   Yes   No   Tell us about it...

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:
Serializable

public class CreateRouteRequest
extends AmazonWebServiceRequest
implements Serializable

Container for the parameters to the CreateRoute operation.

Creates a new route in a route table within a VPC. The route's target can be either a gateway attached to the VPC or a NAT instance in the VPC.

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 is more specific, so we use that route to determine where to target the traffic.

For more information about route tables, go to Route Tables in the Amazon Virtual Private Cloud User Guide.

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

Constructor Summary
CreateRouteRequest()
           
 
Method Summary
 boolean equals(Object obj)
           
 String getDestinationCidrBlock()
          The CIDR address block used for the destination match.
 String getGatewayId()
          The ID of a VPN or Internet gateway attached to your VPC.
 String getInstanceId()
          The ID of a NAT instance in your VPC.
 String getNetworkInterfaceId()
          Returns the value of the NetworkInterfaceId property for this object.
 String getRouteTableId()
          The ID of the route table where the route will be added.
 int hashCode()
           
 void setDestinationCidrBlock(String destinationCidrBlock)
          The CIDR address block used for the destination match.
 void setGatewayId(String gatewayId)
          The ID of a VPN or Internet gateway attached to your VPC.
 void setInstanceId(String instanceId)
          The ID of a NAT instance in your VPC.
 void setNetworkInterfaceId(String networkInterfaceId)
          Sets the value of the NetworkInterfaceId property for this object.
 void setRouteTableId(String routeTableId)
          The ID of the route table where the route will be added.
 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 a VPN or Internet gateway attached to your VPC.
 CreateRouteRequest withInstanceId(String instanceId)
          The ID of a NAT instance in your VPC.
 CreateRouteRequest withNetworkInterfaceId(String networkInterfaceId)
          Sets the value of the NetworkInterfaceId property for this object.
 CreateRouteRequest withRouteTableId(String routeTableId)
          The ID of the route table where the route will be added.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, setRequestCredentials
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CreateRouteRequest

public CreateRouteRequest()
Method Detail

getRouteTableId

public String getRouteTableId()
The ID of the route table where the route will be added.

Returns:
The ID of the route table where the route will be added.

setRouteTableId

public void setRouteTableId(String routeTableId)
The ID of the route table where the route will be added.

Parameters:
routeTableId - The ID of the route table where the route will be added.

withRouteTableId

public CreateRouteRequest withRouteTableId(String routeTableId)
The ID of the route table where the route will be added.

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

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

getDestinationCidrBlock

public String getDestinationCidrBlock()
The CIDR address block used for the destination match. For example: 0.0.0.0/0. Routing decisions are based on the most specific match.

Returns:
The CIDR address block used for the destination match. For example: 0.0.0.0/0. Routing decisions are based on the most specific match.

setDestinationCidrBlock

public void setDestinationCidrBlock(String destinationCidrBlock)
The CIDR address block used for the destination match. For example: 0.0.0.0/0. Routing decisions are based on the most specific match.

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

withDestinationCidrBlock

public CreateRouteRequest withDestinationCidrBlock(String destinationCidrBlock)
The CIDR address block used for the destination match. For example: 0.0.0.0/0. 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. For example: 0.0.0.0/0. 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 String getGatewayId()
The ID of a VPN or Internet gateway attached to your VPC. You must provide either GatewayId or InstanceId, but not both.

Returns:
The ID of a VPN or Internet gateway attached to your VPC. You must provide either GatewayId or InstanceId, but not both.

setGatewayId

public void setGatewayId(String gatewayId)
The ID of a VPN or Internet gateway attached to your VPC. You must provide either GatewayId or InstanceId, but not both.

Parameters:
gatewayId - The ID of a VPN or Internet gateway attached to your VPC. You must provide either GatewayId or InstanceId, but not both.

withGatewayId

public CreateRouteRequest withGatewayId(String gatewayId)
The ID of a VPN or Internet gateway attached to your VPC. You must provide either GatewayId or InstanceId, but not both.

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

Parameters:
gatewayId - The ID of a VPN or Internet gateway attached to your VPC. You must provide either GatewayId or InstanceId, but not both.
Returns:
A reference to this updated object so that method calls can be chained together.

getInstanceId

public String getInstanceId()
The ID of a NAT instance in your VPC. You must provide either GatewayId or InstanceId, but not both.

Returns:
The ID of a NAT instance in your VPC. You must provide either GatewayId or InstanceId, but not both.

setInstanceId

public void setInstanceId(String instanceId)
The ID of a NAT instance in your VPC. You must provide either GatewayId or InstanceId, but not both.

Parameters:
instanceId - The ID of a NAT instance in your VPC. You must provide either GatewayId or InstanceId, but not both.

withInstanceId

public CreateRouteRequest withInstanceId(String instanceId)
The ID of a NAT instance in your VPC. You must provide either GatewayId or InstanceId, but not both.

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. You must provide either GatewayId or InstanceId, but not both.
Returns:
A reference to this updated object so that method calls can be chained together.

getNetworkInterfaceId

public String getNetworkInterfaceId()
Returns the value of the NetworkInterfaceId property for this object.

Returns:
The value of the NetworkInterfaceId property for this object.

setNetworkInterfaceId

public void setNetworkInterfaceId(String networkInterfaceId)
Sets the value of the NetworkInterfaceId property for this object.

Parameters:
networkInterfaceId - The new value for the NetworkInterfaceId property for this object.

withNetworkInterfaceId

public CreateRouteRequest withNetworkInterfaceId(String networkInterfaceId)
Sets the value of the NetworkInterfaceId property for this object.

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

Parameters:
networkInterfaceId - The new value for the NetworkInterfaceId property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.

toString

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

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


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