public class AssignPrivateIpAddressesRequest extends AmazonWebServiceRequest implements java.io.Serializable
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.
Constructor and Description |
---|
AssignPrivateIpAddressesRequest() |
Modifier and Type | Method and Description |
---|---|
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.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public java.lang.String getNetworkInterfaceId()
public void setNetworkInterfaceId(java.lang.String networkInterfaceId)
networkInterfaceId
- The ID of the network interface.public AssignPrivateIpAddressesRequest withNetworkInterfaceId(java.lang.String networkInterfaceId)
Returns a reference to this object so that method calls can be chained together.
networkInterfaceId
- The ID of the network interface.public java.util.List<java.lang.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(java.util.Collection<java.lang.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(java.lang.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 AssignPrivateIpAddressesRequest withPrivateIpAddresses(java.util.Collection<java.lang.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 java.lang.Integer getSecondaryPrivateIpAddressCount()
public void setSecondaryPrivateIpAddressCount(java.lang.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(java.lang.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 java.lang.Boolean isAllowReassignment()
public void setAllowReassignment(java.lang.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(java.lang.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 java.lang.Boolean getAllowReassignment()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.