Menu
Amazon Elastic Compute Cloud
API Reference (API Version 2016-11-15)

DescribeAddresses

Describes one or more 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.

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] One or more allocation IDs.

Default: Describes all your Elastic IP addresses.

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 is UnauthorizedOperation.

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-interface-id - [EC2-VPC] The ID of the network interface that the address is associated with, if any.

  • network-interface-owner-id - The AWS 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.

Type: Array of Filter objects

Required: No

PublicIp.N

[EC2-Classic] 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 one or more 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 Errors.

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 AWS SDKs, see the following: