com.amazonaws.services.ec2.model
Class AssignPrivateIpAddressesRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.ec2.model.AssignPrivateIpAddressesRequest
All Implemented Interfaces:
java.io.Serializable

public class AssignPrivateIpAddressesRequest
extends AmazonWebServiceRequest
implements java.io.Serializable

Container for the parameters to the AssignPrivateIpAddresses operation.

Assigns one or more secondary private IP addresses to the specified network interface. You can specify one or more specific secondary IP addresses, or you can specify the number of secondary IP addresses to be automatically assigned within the subnet's CIDR block range. The number of secondary IP addresses that you can assign to an instance varies by instance type. For information about instance types, see Instance Types in the Amazon Elastic Compute Cloud User Guide . For more information about Elastic IP addresses, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide .

AssignPrivateIpAddresses is available only in EC2-VPC.

See Also:
AmazonEC2.assignPrivateIpAddresses(AssignPrivateIpAddressesRequest), Serialized Form

Constructor Summary
AssignPrivateIpAddressesRequest()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.Boolean getAllowReassignment()
          Indicates whether to allow an IP address that is already assigned to another network interface or instance to be reassigned to the specified network interface.
 java.lang.String getNetworkInterfaceId()
          The ID of the network interface.
 java.util.List<java.lang.String> getPrivateIpAddresses()
          One or more IP addresses to be assigned as a secondary private IP address to the network interface.
 java.lang.Integer getSecondaryPrivateIpAddressCount()
          The number of secondary IP addresses to assign to the network interface.
 int hashCode()
           
 java.lang.Boolean isAllowReassignment()
          Indicates whether to allow an IP address that is already assigned to another network interface or instance to be reassigned to the specified network interface.
 void setAllowReassignment(java.lang.Boolean allowReassignment)
          Indicates whether to allow an IP address that is already assigned to another network interface or instance to be reassigned to the specified network interface.
 void setNetworkInterfaceId(java.lang.String networkInterfaceId)
          The ID of the network interface.
 void setPrivateIpAddresses(java.util.Collection<java.lang.String> privateIpAddresses)
          One or more IP addresses to be assigned as a secondary private IP address to the network interface.
 void setSecondaryPrivateIpAddressCount(java.lang.Integer secondaryPrivateIpAddressCount)
          The number of secondary IP addresses to assign to the network interface.
 java.lang.String toString()
          Returns a string representation of this object; useful for testing and debugging.
 AssignPrivateIpAddressesRequest withAllowReassignment(java.lang.Boolean allowReassignment)
          Indicates whether to allow an IP address that is already assigned to another network interface or instance to be reassigned to the specified network interface.
 AssignPrivateIpAddressesRequest withNetworkInterfaceId(java.lang.String networkInterfaceId)
          The ID of the network interface.
 AssignPrivateIpAddressesRequest withPrivateIpAddresses(java.util.Collection<java.lang.String> privateIpAddresses)
          One or more IP addresses to be assigned as a secondary private IP address to the network interface.
 AssignPrivateIpAddressesRequest withPrivateIpAddresses(java.lang.String... privateIpAddresses)
          One or more IP addresses to be assigned as a secondary private IP address to the network interface.
 AssignPrivateIpAddressesRequest withSecondaryPrivateIpAddressCount(java.lang.Integer secondaryPrivateIpAddressCount)
          The number of secondary IP addresses to assign to the network interface.
 
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

AssignPrivateIpAddressesRequest

public AssignPrivateIpAddressesRequest()
Method Detail

getNetworkInterfaceId

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

Returns:
The ID of the network interface.

setNetworkInterfaceId

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

Parameters:
networkInterfaceId - The ID of the network interface.

withNetworkInterfaceId

public AssignPrivateIpAddressesRequest withNetworkInterfaceId(java.lang.String networkInterfaceId)
The ID of the network interface.

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

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

getPrivateIpAddresses

public java.util.List<java.lang.String> getPrivateIpAddresses()
One or more IP addresses to be assigned as a secondary private IP address to the network interface.

If you don't specify an IP address, Amazon EC2 automatically selects an IP address within the subnet range.

Returns:
One or more IP addresses to be assigned as a secondary private IP address to the network interface.

If you don't specify an IP address, Amazon EC2 automatically selects an IP address within the subnet range.


setPrivateIpAddresses

public void setPrivateIpAddresses(java.util.Collection<java.lang.String> privateIpAddresses)
One or more IP addresses to be assigned as a secondary private IP address to the network interface.

If you don't specify an IP address, Amazon EC2 automatically selects an IP address within the subnet range.

Parameters:
privateIpAddresses - One or more IP addresses to be assigned as a secondary private IP address to the network interface.

If you don't specify an IP address, Amazon EC2 automatically selects an IP address within the subnet range.


withPrivateIpAddresses

public AssignPrivateIpAddressesRequest withPrivateIpAddresses(java.lang.String... privateIpAddresses)
One or more IP addresses to be assigned as a secondary private IP address to the network interface.

If you don't specify an IP address, Amazon EC2 automatically selects an IP address within the subnet range.

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

Parameters:
privateIpAddresses - One or more IP addresses to be assigned as a secondary private IP address to the network interface.

If you don't specify an IP address, Amazon EC2 automatically selects an IP address within the subnet range.

Returns:
A reference to this updated object so that method calls can be chained together.

withPrivateIpAddresses

public AssignPrivateIpAddressesRequest withPrivateIpAddresses(java.util.Collection<java.lang.String> privateIpAddresses)
One or more IP addresses to be assigned as a secondary private IP address to the network interface.

If you don't specify an IP address, Amazon EC2 automatically selects an IP address within the subnet range.

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

Parameters:
privateIpAddresses - One or more IP addresses to be assigned as a secondary private IP address to the network interface.

If you don't specify an IP address, Amazon EC2 automatically selects an IP address within the subnet range.

Returns:
A reference to this updated object so that method calls can be chained together.

getSecondaryPrivateIpAddressCount

public java.lang.Integer getSecondaryPrivateIpAddressCount()
The number of secondary IP addresses to assign to the network interface.

Returns:
The number of secondary IP addresses to assign to the network interface.

setSecondaryPrivateIpAddressCount

public void setSecondaryPrivateIpAddressCount(java.lang.Integer secondaryPrivateIpAddressCount)
The number of secondary IP addresses to assign to the network interface.

Parameters:
secondaryPrivateIpAddressCount - The number of secondary IP addresses to assign to the network interface.

withSecondaryPrivateIpAddressCount

public AssignPrivateIpAddressesRequest withSecondaryPrivateIpAddressCount(java.lang.Integer secondaryPrivateIpAddressCount)
The number of secondary IP addresses to assign to the network interface.

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

Parameters:
secondaryPrivateIpAddressCount - The number of secondary IP addresses to assign to the network interface.
Returns:
A reference to this updated object so that method calls can be chained together.

isAllowReassignment

public java.lang.Boolean isAllowReassignment()
Indicates whether to allow an IP address that is already assigned to another network interface or instance to be reassigned to the specified network interface.

Returns:
Indicates whether to allow an IP address that is already assigned to another network interface or instance to be reassigned to the specified network interface.

setAllowReassignment

public void setAllowReassignment(java.lang.Boolean allowReassignment)
Indicates whether to allow an IP address that is already assigned to another network interface or instance to be reassigned to the specified network interface.

Parameters:
allowReassignment - Indicates whether to allow an IP address that is already assigned to another network interface or instance to be reassigned to the specified network interface.

withAllowReassignment

public AssignPrivateIpAddressesRequest withAllowReassignment(java.lang.Boolean allowReassignment)
Indicates whether to allow an IP address that is already assigned to another network interface or instance to be reassigned to the specified network interface.

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

Parameters:
allowReassignment - Indicates whether to allow an IP address that is already assigned to another network interface or instance to be reassigned to the specified network interface.
Returns:
A reference to this updated object so that method calls can be chained together.

getAllowReassignment

public java.lang.Boolean getAllowReassignment()
Indicates whether to allow an IP address that is already assigned to another network interface or instance to be reassigned to the specified network interface.

Returns:
Indicates whether to allow an IP address that is already assigned to another network interface or instance to be reassigned to the specified network interface.

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.