Amazon Elastic Compute Cloud
API Reference (API Version 2013-02-01)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Did this page help you?  Yes | No |  Tell us about it...

DescribeAddresses

Description

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

PublicIp.n

One or more EC2 Elastic IP addresses.

Type: String

Default: None

Required: No

AllocationId.n

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

Type: String

Default: None

Required: No

Filter.n.Name

The name of a filter. See the Supported Filters section for a list of supported filter names.

Type: String

Default: None

Required: No

Filter.n.Value.m

A value for the filter. See the Supported Filters section for a list of supported values for each filter.

Type: String

Default: None

Required: No

Supported Filters

You can specify filters so that the response includes information for only certain Elastic IP addresses. For example, you can use a filter to specify that you're interested in addresses that have a specific tag. You can specify multiple values for a filter. The response includes information for an address only if it matches at least one of the filter values that you specified.

You can specify multiple filters; for example, specify addresses of a specific value that have a specific tag. The response includes information for an address only if it matches all the filters that you specified. If there's no match, no special message is returned, the response is simply empty.

You can use wildcards in a filter value. An asterisk (*) matches zero or more characters, and a question mark (?) 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 are the available filters.

domain

Indicates whether the address is for use in a VPC.

Type: String

Valid values: standard | vpc

instance-id

The instance the address is associated with (if any).

Type: String

public-ip

The Elastic IP address.

Type: String

allocation-id

The allocation ID for the address (VPC only).

Type: String

association-id

The association ID for the address (VPC only).

Type: String

network-interface-id

The network interface (if any) that the address is associated with (VPC only).

Type: String

network-interface-owner-id

The owner IID.

Type: String

private-ip-address

The private IP address associated with the Elastic IP address (VPC only).

Type: String

Response Elements

The following elements are returned in a DescribeAddressesResponse element.

requestId

The ID of the request.

Type: xsd:string

addressesSet

A list of IP addresses, each one wrapped in an item element.

Type: DescribeAddressesResponseItemType

Examples

Example Request

EC2-Classic: This example describes two specific 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/2013-02-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

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

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

Example Response

<DescribeAddressesResponse xmlns="http://ec2.amazonaws.com/doc/2013-02-01/">
   <requestId>f7de5e98-491a-4c19-a92d-908d6EXAMPLE</requestId>
   <addressesSet>
     <item>
       <publicIp>203.0.113.41</publicIp>
       <allocationId>eipalloc-08229861</allocationId>
       <domain>vpc</domain>
       <instanceId>i-64600030</instanceId>
       <associationId>eipassoc-f0229899</associationId>
       <networkInterfaceId>eni-ef229886</networkInterfaceId>
       <networkInterfaceOwnerId>053230519467</networkInterfaceOwnerId>
       <privateIpAddress>10.0.0.228</privateIpAddress>
     </item>
   </addressesSet>
</DescribeAddressesResponse>

Example Request

EC2-VPC: This example lists all of your addresses for EC2-VPC, but none for EC2-Classic (assuming you have both types of addresses).

https://ec2.amazonaws.com/?Action=DescribeAddresses
&Filter.1.Name=domain
&Filter.1.Value.1=vpc
&AUTHPARAMS