These methods allow you to control private IP addresses associated with instances running in a VPC.
$result=$ec2->assign_private_ip_addresses(%args)
Assign one or more secondary private IP addresses to a network interface. You can either set the
addresses explicitly, or provide a count of secondary addresses, and let Amazon select them for you.
Required arguments:
-network_interface_id The network interface to which the IP address(es)
will be assigned.
-private_ip_address One or more secondary IP addresses, as a scalar string
-private_ip_addresses or array reference. (The two arguments are equivalent).
Optional arguments:
-allow_reassignment If true, allow assignment of an IP address is already in
use by another network interface or instance.
The following are valid arguments to -private_ip_address:
-private_ip_address => '192.168.0.12' # single address
-private_ip_address => ['192.168.0.12','192.168.0.13] # multiple addresses
-private_ip_address => 3 # autoselect three addresses
The mixed form of address, such as ['192.168.0.12','auto'] is not allowed in this call.
On success, this method returns true.
$result=$ec2->unassign_private_ip_addresses(%args)
Unassign one or more secondary private IP addresses from a network interface.
Required arguments:
-network_interface_id The network interface to which the IP address(es)
will be assigned.
-private_ip_address One or more secondary IP addresses, as a scalar string
-private_ip_addresses or array reference. (The two arguments are equivalent).
The following are valid arguments to -private_ip_address:
-private_ip_address => '192.168.0.12' # single address
-private_ip_address => ['192.168.0.12','192.168.0.13] # multiple addresses
On success, this method returns true.