Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to Digg

DescribeAddresses

Description

Gives information about Elastic IP addresses allocated to your account. This includes both EC2 and VPC Elastic IP addresses. For information about VPC addresses and how they differ from EC2 addresses, go to Elastic IP Addresses in the Amazon Virtual Private Cloud User Guide.

You can filter the results to return information only about Elastic IP addresses that match criteria you specify. For example, you could get information only about addresses tagged with a certain value. You can specify multiple values for a filter. An address must match at least one of the specified values for it to be included in the results.

You can specify multiple filters (e.g., the address is a particular value, and is tagged with a certain value). The result includes information for an address only if it matches all your filters. If there's no match, no special message is returned; the response is simply empty.

You can use wildcards with the filter values: * matches zero or more characters, and ? matches exactly one character. You can escape special characters using a backslash before the character. For example, a value of \*amazon\?\\ searches for the literal string *amazon?\.

The following table shows the available filters.

Filter Name Description

domain

Whether the address is a EC2 address, or a VPC address.

Type: String

Valid Values: standard | vpc

instance-id

Instance the address is associated with (if any).

Type: String

public-ip

The Elastic IP address.

Type: String

allocation-id

Allocation ID for the address (for VPC addresses only).

Type: String

association-id

Association ID for the address (for VPC addresses only).

Type: String

Request Parameters

NameDescriptionRequired

PublicIp.n

One or more Elastic IP addresses. Applies only to standard (EC2) addresses.

Type: String

Default: None

No

AllocationId.n

One or more allocation IDs corresponding to the address or addresses to describe. Applies only to VPC addresses.

Type: String

Default: None

No

Filter.n.Name

Name of a filter. See the preceding table for a list of allowed filter names.

Type: String

Default: None

No

Filter.n.Value.m

A value for the filter. See the preceding table for a list of allowed values for each filter.

Type: String

Default: None

No

Response Elements

The elements in the following table are wrapped in a DescribeAddressesResponse structure.

NameDescription

requestId

The ID of the request.

Type: xsd:string

addressesSet

A list of IP addresses. Each IP address's information is wrapped in an item element.

Type: DescribeAddressesResponseItemType

Examples

Example Request

EC2 addresses: This example describes two specific EC2 Elastic IP addresses assigned to the account. Amazon EC2 returns information about 192.0.2.1, which is assigned to instance i-f15ebb98, and for 198.51.100.2, which is not assigned to an instance.

https://ec2.amazonaws.com/?Action=DescribeAddresses
&PublicIp.1=192.0.2.1
&PublicIp.2=198.51.100.2
&AUTHPARAMS

Example Response

<DescribeAddressesResponse xmlns="http://ec2.amazonaws.com/doc/2011-01-01/">
   <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId> 
   <addressesSet> 
      <item>
         <publicIp>192.0.2.1</publicIp>
         <domain>standard</domain>
         <instanceId>i-f15ebb98</instanceId>
      </item>
      <item>
         <publicIp>198.51.100.2</publicIp>
         <domain>standard</domain>
         <instanceId/>
      </item> 
   </addressesSet> 
</DescribeAddressesResponse>

Example Request

VPC Addresses: This example describes a specific VPC address allocated to your account. You must use the allocation ID to specify the address.

https://ec2.amazonaws.com/?Action=DescribeAddresses
&AllocationId.1= eipalloc-5723d13e
&AUTHPARAMS

Example Response

<DescribeAddressesResponse xmlns="http://ec2.amazonaws.com/doc/2011-01-01/">
   <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId> 
   <addressesSet>
      <item>
         <publicIp>203.0.113.1</publicIp>
         <allocationId>eipalloc-5723d13e</allocationId>
         <domain>vpc</domain>
         <instanceId>i-9e9da4e9</instanceId>
         <associationId>eipassoc-ba03f1d3</associationId>
      </item>
   </addressesSet> 
</DescribeAddressesResponse>

Example Request

VPC Addresses: This example lists only your VPC addresses (assuming you have both standard and VPC addresses).

https://ec2.amazonaws.com/?Action=DescribeAddresses
&Filter.1.Name=allocation-id
&Filter.1.Value.1=*
&AUTHPARAMS

Example Response

<DescribeAddressesResponse xmlns="http://ec2.amazonaws.com/doc/2011-01-01/">
   <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId> 
   <addressesSet>
      <item>
         <publicIp>198.51.100.9</publicIp>
         <allocationId>eipalloc-5723d13e</allocationId>
         <domain>vpc</domain>
         <instanceId>i-9e9da4e9</instanceId>
         <associationId>eipassoc-ba03f1d3</associationId>
      </item>
      <item>
         <publicIp>203.0.113.4</publicIp>
         <allocationId>eipalloc-993dd4a2</allocationId>
         <domain>vpc</domain>
         <instanceId>i-225fg8a</instanceId>
         <associationId>eipassoc-85d2a3d</associationId>
      </item>
   </addressesSet> 
</DescribeAddressesResponse>