Getting Information About Your EIPs
You can get information about the External IPs (EIPs) allocated to your account.
By default, this action returns information about all your EIPs, whether available, associated with an instance or a network interface, or used for a NAT gateway. For more information, see About EIPs, Associating an EIP with an Instance or a Network Interface, or Creating a NAT gateway.
Information about your EIPs is also available from within the associated instances themselves. For more information, see Accessing the Metadata and User Data of an Instance.
Getting Information About Your Public IPs Using OSC CLI
See the ReadPublicIps command sample in the documentation of the OUTSCALE API. This method returns information on Public IPs linked with various resources including internet-facing load balancers. |
Linking a Public IP with an internet-facing load balancer is only possible through the CreateLoadBalancer and UpdateLoadBalancer OUTSCALE API methods. |
Getting Information About Your EIPs Using AWS CLI
To get information about your EIPs, use the describe-addresses command following this syntax:
$ aws ec2 describe-addresses \
--profile YOUR_PROFILE \
--public-ips 111.1.1.1 \
[--allocation-ids NOT_SPECIFIED] \
[--filters NOT_SPECIFIED] \
--endpoint https://fcu.eu-west-2.outscale.com
This command contains the following attributes that you need to specify:
-
(optional)
profile
: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI. -
(optional)
public-ips
: One or more EIPs you want information about.You need to specify either
public-ips
orallocation-ids
. -
(optional)
allocation-ids
: One or more IDs of allocation. -
(optional)
filters
: One or more filters, in the "Name=X,Values=Y" format.You can specify several values for a same filter using the "Name=X,Values=Y, Z" format.
The following filters are available:
-
instance-id
: The ID of the instance the EIP is associated with.You need to specify either an
instance-id
or anetwork-interface-id
. -
network-interface-id
: The ID of the network interface the EIP is associated with. -
network-interface-owner-id
: The account ID of the owner of the EIP. -
public-ip
: The EIP. -
private-ip-address
: The private IP of the instance or the primary private IP of the primary network interface associated with the EIP (if a network interface has several private IPs, the EIP is associated either with the primary or a secondary one).You can associate your EIP with a secondary private IP of a network interface. If you do not specify any private IP, the EIP is associated with the primary private IP of the primary network interface.
-
allocation-id
: The allocation ID of the EIP. -
association-id
: The ID of the association of the EIP with an instance or a network interface.
-
-
endpoint
: The endpoint corresponding to the Region you want to send the request to.
The describe-addresses command returns the following elements:
-
Addresses
: Information about one or more EIPs. This element contains the following information:-
InstanceId
: The ID of the instance the EIP is associated with. -
PublicIp
: The EIP. -
Domain
: Whether your EIP is in a VPC or in the public Cloud. This element is for information only. -
NetworkInterfaceId
: The ID of the network interface the EIP is associated with. -
AssociationId
: The ID of the association of the EIP with an instance or a network interface. -
NetworkInterfaceOwnerId
: The account ID of the owner of the EIP. -
AllocationId
: The ID of the allocation. -
PrivateIpAddress
: The private IP of the instance or the network interface associated with the EIP (if a network interface has several private IPs, it is either the primary or a secondary one).Even if the EIP is not associated with any resource, the
InstanceId
, thePublicIp
, theDomain
and theAllocationId
elements are displayed.
-
{
"Addresses": [
{
"InstanceId": "",
"PublicIp": "222.2.2.2",
"Domain": "standard",
"AllocationId": "eipalloc-12345679"
},
{
"Domain": "vpc",
"InstanceId": "i-1234567890abcdef0",
"NetworkInterfaceId": "eni-12345678",
"AssociationId": "eipassoc-12345678",
"NetworkInterfaceOwnerId": "123456789012",
"PublicIp": "111.1.1.1",
"AllocationId": "eipalloc-12345678",
"PrivateIpAddress": "10.0.0.0"
}
]
}
Related Pages
Corresponding API Methods
AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.