public class AssignPrivateIpAddressesRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
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.
NOOP
Constructor and Description |
---|
AssignPrivateIpAddressesRequest() |
Modifier and Type | Method and Description |
---|---|
AssignPrivateIpAddressesRequest |
clone()
Creates a shallow clone of this request.
|
boolean |
equals(Object obj) |
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.
|
String |
getNetworkInterfaceId()
The ID of the network interface.
|
List<String> |
getPrivateIpAddresses()
One or more IP addresses to be assigned as a secondary private IP
address to the network interface.
|
Integer |
getSecondaryPrivateIpAddressCount()
The number of secondary IP addresses to assign to the network
interface.
|
int |
hashCode() |
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(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(String networkInterfaceId)
The ID of the network interface.
|
void |
setPrivateIpAddresses(Collection<String> privateIpAddresses)
One or more IP addresses to be assigned as a secondary private IP
address to the network interface.
|
void |
setSecondaryPrivateIpAddressCount(Integer secondaryPrivateIpAddressCount)
The number of secondary IP addresses to assign to the network
interface.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
AssignPrivateIpAddressesRequest |
withAllowReassignment(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(String networkInterfaceId)
The ID of the network interface.
|
AssignPrivateIpAddressesRequest |
withPrivateIpAddresses(Collection<String> privateIpAddresses)
One or more IP addresses to be assigned as a secondary private IP
address to the network interface.
|
AssignPrivateIpAddressesRequest |
withPrivateIpAddresses(String... privateIpAddresses)
One or more IP addresses to be assigned as a secondary private IP
address to the network interface.
|
AssignPrivateIpAddressesRequest |
withSecondaryPrivateIpAddressCount(Integer secondaryPrivateIpAddressCount)
The number of secondary IP addresses to assign to the network
interface.
|
copyBaseTo, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public String getNetworkInterfaceId()
public void setNetworkInterfaceId(String networkInterfaceId)
networkInterfaceId
- The ID of the network interface.public AssignPrivateIpAddressesRequest withNetworkInterfaceId(String networkInterfaceId)
Returns a reference to this object so that method calls can be chained together.
networkInterfaceId
- The ID of the network interface.public List<String> getPrivateIpAddresses()
If you don't specify an IP address, Amazon EC2 automatically selects an IP address within the subnet range.
If you don't specify an IP address, Amazon EC2 automatically selects an IP address within the subnet range.
public void setPrivateIpAddresses(Collection<String> privateIpAddresses)
If you don't specify an IP address, Amazon EC2 automatically selects an IP address within the subnet range.
privateIpAddresses
- One or more IP addresses to be assigned as a secondary private IP
address to the network interface. You can't specify this parameter
when also specifying a number of secondary IP addresses. If you don't specify an IP address, Amazon EC2 automatically selects an IP address within the subnet range.
public AssignPrivateIpAddressesRequest withPrivateIpAddresses(String... privateIpAddresses)
If you don't specify an IP address, Amazon EC2 automatically selects an IP address within the subnet range.
NOTE: This method appends the values to the existing list (if
any). Use setPrivateIpAddresses(java.util.Collection)
or
withPrivateIpAddresses(java.util.Collection)
if you want to
override the existing values.
Returns a reference to this object so that method calls can be chained together.
privateIpAddresses
- One or more IP addresses to be assigned as a secondary private IP
address to the network interface. You can't specify this parameter
when also specifying a number of secondary IP addresses. If you don't specify an IP address, Amazon EC2 automatically selects an IP address within the subnet range.
public AssignPrivateIpAddressesRequest withPrivateIpAddresses(Collection<String> privateIpAddresses)
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.
privateIpAddresses
- One or more IP addresses to be assigned as a secondary private IP
address to the network interface. You can't specify this parameter
when also specifying a number of secondary IP addresses. If you don't specify an IP address, Amazon EC2 automatically selects an IP address within the subnet range.
public Integer getSecondaryPrivateIpAddressCount()
public void setSecondaryPrivateIpAddressCount(Integer secondaryPrivateIpAddressCount)
secondaryPrivateIpAddressCount
- The number of secondary IP addresses to assign to the network
interface. You can't specify this parameter when also specifying
private IP addresses.public AssignPrivateIpAddressesRequest withSecondaryPrivateIpAddressCount(Integer secondaryPrivateIpAddressCount)
Returns a reference to this object so that method calls can be chained together.
secondaryPrivateIpAddressCount
- The number of secondary IP addresses to assign to the network
interface. You can't specify this parameter when also specifying
private IP addresses.public Boolean isAllowReassignment()
public void setAllowReassignment(Boolean allowReassignment)
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.public AssignPrivateIpAddressesRequest withAllowReassignment(Boolean allowReassignment)
Returns a reference to this object so that method calls can be chained together.
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.public Boolean getAllowReassignment()
public String toString()
toString
in class Object
Object.toString()
public AssignPrivateIpAddressesRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()
Copyright © 2015. All rights reserved.