DescribeAddresses
Describes the specified Elastic IP addresses or all of your Elastic IP addresses.
An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For more information, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide.
We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide.
Request Parameters
The following parameters are for this specific action. For more information about required and optional parameters that are common to all actions, see Common Query Parameters.
- AllocationId.N
-
[EC2-VPC] Information about the allocation IDs.
Type: Array of strings
Required: No
- DryRun
-
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
.Type: Boolean
Required: No
- Filter.N
-
One or more filters. Filter names and values are case-sensitive.
-
allocation-id
- [EC2-VPC] The allocation ID for the address. -
association-id
- [EC2-VPC] The association ID for the address. -
domain
- Indicates whether the address is for use in EC2-Classic (standard
) or in a VPC (vpc
). -
instance-id
- The ID of the instance the address is associated with, if any. -
network-border-group
- A unique set of Availability Zones, Local Zones, or Wavelength Zones from where Amazon advertises IP addresses. -
network-interface-id
- [EC2-VPC] The ID of the network interface that the address is associated with, if any. -
network-interface-owner-id
- The Amazon Web Services account ID of the owner. -
private-ip-address
- [EC2-VPC] The private IP address associated with the Elastic IP address. -
public-ip
- The Elastic IP address, or the carrier IP address. -
tag
:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the keyOwner
and the valueTeamA
, specifytag:Owner
for the filter name andTeamA
for the filter value. -
tag-key
- The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
Type: Array of Filter objects
Required: No
-
- PublicIp.N
-
One or more Elastic IP addresses.
Default: Describes all your Elastic IP addresses.
Type: Array of strings
Required: No
Response Elements
The following elements are returned by the service.
- addressesSet
-
Information about the Elastic IP addresses.
Type: Array of Address objects
- requestId
-
The ID of the request.
Type: String
Errors
For information about the errors that are common to all actions, see Common client error codes.
Examples
Example for EC2-Classic
This example request describes two specific Elastic IP addresses allocated to
your account. Both addresses were created for instances in EC2-Classic, so you must
specify them using their IP addresses. The address 192.0.2.1
is assigned to
instance i-1234567890abcdef0
, and 198.51.100.2
isn't assigned to
an instance.
Sample Request
https://ec2.amazonaws.com/?Action=DescribeAddresses
&PublicIp.1=192.0.2.1
&PublicIp.2=198.51.100.2
&AUTHPARAMS
Sample Response
<DescribeAddressesResponse xmlns="http://ec2.amazonaws.com/doc/2016-11-15/">
<requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>
<addressesSet>
<item>
<publicIp>192.0.2.1</publicIp>
<domain>standard</domain>
<instanceId>i-1234567890abcdef0</instanceId>
</item>
<item>
<publicIp>198.51.100.2</publicIp>
<domain>standard</domain>
<instanceId/>
</item>
</addressesSet>
</DescribeAddressesResponse>
Example 1 for EC2-VPC
This example request describes a specific Elastic IP address allocated to your account. This address was created for instances in EC2-VPC, so you must use the allocation ID to specify the address.
Sample Request
https://ec2.amazonaws.com/?Action=DescribeAddresses
&AllocationId.1= eipalloc-08229861
&AUTHPARAMS
Sample Response
<DescribeAddressesResponse xmlns="http://ec2.amazonaws.com/doc/2016-11-15/">
<requestId>f7de5e98-491a-4c19-a92d-908d6EXAMPLE</requestId>
<addressesSet>
<item>
<publicIp>203.0.113.41</publicIp>
<allocationId>eipalloc-08229861</allocationId>
<domain>vpc</domain>
<instanceId>i-0598c7d356eba48d7</instanceId>
<associationId>eipassoc-f0229899</associationId>
<networkInterfaceId>eni-ef229886</networkInterfaceId>
<networkInterfaceOwnerId>053230519467</networkInterfaceOwnerId>
<privateIpAddress>10.0.0.228</privateIpAddress>
</item>
</addressesSet>
</DescribeAddressesResponse>
Example 2 for EC2-VPC
This example describes your Elastic IP addresses for EC2-VPC only.
Sample Request
https://ec2.amazonaws.com/?Action=DescribeAddresses
&Filter.1.Name=domain
&Filter.1.Value.1=vpc
&AUTHPARAMS
See Also
For more information about using this API in one of the language-specific Amazon SDKs, see the following: