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

DescribeNetworkInterfaces

Description

Describes one or more of your network interfaces.

Request Parameters

NetworkInterfaceId.n

One or more network interface IDs.

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 network interfaces. For example, you can use a filter to specify that you're interested in network interfaces launched in a specific Availability Zone. You can specify multiple values for a filter. The response includes information for a network interface only if it matches at least one of the filter values that you specified.

You can specify multiple filters; for example, specify network interfaces in a specific Availability Zone, and that have a specific owner ID. The response includes information for a network interface 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.

addresses.private-ip-address

The private IP addresses associated with the network interface.

Type: String

addresses.primary

Whether the private IP address is the primary IP address associated with the network interface.

Type: Boolean

Valid values: true | false

addresses.association.public-ip

The association ID returned when the network interface was associated with the Elastic IP address.

Type: String

addresses.association.owner-id

The owner ID of the addresses associated with the network interface.

Type: String

association.association-id

The association ID returned when the network interface was associated with an IP address.

Type: String

association.allocation-id

The allocation ID that AWS returned when you allocated the Elastic IP address for your network interface.

Type: String

association.ip-owner-id

The owner of the Elastic IP address associated with the network interface.

Type: String

association.public-ip

The address of the Elastic IP address bound to the network interface.

Type: String

attachment.attachment-id

The ID of the interface attachment.

Type: String

attachment.instance-id

The ID of the instance to which the network interface is attached.

Type: String

attachment.instance-owner-id

The owner ID of the instance to which the network interface is attached.

Type: String

attachment.device-index

The device index to which the network interface is attached.

Type: Integer

attachment.status

The status of the attachment.

Type: String

Valid values: attaching | attached | detaching | detached

attachment.attach.time

The time that the network interface was attached to an instance.

Type: DateTime

attachment.delete-on-termination

Indicates whether the attachment is deleted when an instance is terminated.

Type: Boolean

availability-zone

The Availability Zone of the network interface.

Type: String

description

The description of the network interface.

Type: String

group-id

The ID of a security group associated with the network interface.

Type: String

group-name

The name of a security group associated with the network interface.

Type: String

mac-address

The MAC address of the network interface.

Type: String

network-interface-id

The ID of the network interface.

Type: String

owner-id

The AWS account ID of the network interface owner.

Type: String

private-ip-address

The private IP address or addresses of the network interface.

Type: String

private-dns-name

The private DNS name of the network interface.

Type: String

requester-id

The ID of the entity that launched the instance on your behalf (for example, AWS Management Console, Auto Scaling, and so on).

Type: String

requester-managed

Indicates whether the network interface is being managed by an AWS service (for example, AWS Management Console, Auto Scaling, and so on).

Type: Boolean

source-dest-check

Indicates whether the network interface performs source/destination checking. A value of true means checking is enabled, and false means checking is disabled. The value must be false for the network interface to perform Network Address Translation (NAT) in your VPC.

Type: Boolean

status

The status of the network interface. If the network interface is not attached to an instance, the status shows available; if a network interface is attached to an instance the status shows in-use.

Type: String

Valid values: available | in-use

subnet-id

The ID of the subnet for the network interface.

Type: String

tag-key

The key of a tag assigned to the resource. This filter is independent of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the tag:key filter.

For more information about tags, see Tagging Your Resources in the Amazon Elastic Compute Cloud User Guide.

Type: String

tag-value

The value of a tag assigned to the resource. This filter is independent of the tag-key filter.

Type: String

tag:key

Filters the response based on a specific tag/value combination.

Example: To list just the resources that have been assigned tag Purpose=X, specify:

Filter.1.Name=tag:Purpose

Filter.1.Value.1=X

Example: To list just resources that have been assigned tag Purpose=X OR Purpose=Y, specify:

Filter.1.Name=tag:Purpose

Filter.1.Value.1=X

Filter.1.Value.2=Y

vpc-id

The ID of the VPC for the network interface.

Type: String

Response Elements

The following elements are returned in a DescribeNetworkInterfacesResponse element.

requestId

The ID of the request.

Type: xsd:string

networkInterfaceSet

Information about the network interfaces, each one wrapped in an item element.

Type: NetworkInterfaceType

Examples

Example Request

This example describes network interfaces.

https://ec2.amazonaws.com/?Action=DescribeNetworkInterfaces
&AUTHPARAMS

Example Response

<DescribeNetworkInterfacesResponse xmlns='http://ec2.amazonaws.com/doc/2013-02-01/'>
    <requestId>fc45294c-006b-457b-bab9-012f5b3b0e40</requestId>
     <networkInterfaceSet>
       <item>
         <networkInterfaceId>eni-0f62d866</networkInterfaceId>
         <subnetId>subnet-c53c87ac</subnetId>
         <vpcId>vpc-cc3c87a5</vpcId>
         <availabilityZone>ap-southeast-1b</availabilityZone>
         <description/>
         <ownerId>053230519467</ownerId>
         <requesterManaged>false</requesterManaged>
         <status>in-use</status>
         <macAddress>02:81:60:cb:27:37</macAddress>
         <privateIpAddress>10.0.0.146</privateIpAddress>
         <sourceDestCheck>true</sourceDestCheck>
         <groupSet>
           <item>
             <groupId>sg-3f4b5653</groupId>
             <groupName>default</groupName>
           </item>
         </groupSet>
         <attachment>
           <attachmentId>eni-attach-6537fc0c</attachmentId>
           <instanceId>i-22197876</instanceId>
           <instanceOwnerId>053230519467</instanceOwnerId>
           <deviceIndex>0</deviceIndex>
           <status>attached</status>
           <attachTime>2012-07-01T21:45:27.000Z</attachTime>
           <deleteOnTermination>true</deleteOnTermination>
         </attachment>
         <tagSet/>
         <privateIpAddressesSet>
           <item>
             <privateIpAddress>10.0.0.146</privateIpAddress>
             <primary>true</primary>
           </item>
           <item>
             <privateIpAddress>10.0.0.148</privateIpAddress>
             <primary>false</primary>
           </item>
           <item>
             <privateIpAddress>10.0.0.150</privateIpAddress>
             <primary>false</primary>
           </item>
         </privateIpAddressesSet>
       </item>
       <item>
         <networkInterfaceId>eni-a66ed5cf</networkInterfaceId>
         <subnetId>subnet-cd8a35a4</subnetId>
         <vpcId>vpc-f28a359b</vpcId>
         <availabilityZone>ap-southeast-1b</availabilityZone>
         <description>Primary network interface</description>
         <ownerId>053230519467</ownerId>
         <requesterManaged>false</requesterManaged>
         <status>in-use</status>
         <macAddress>02:78:d7:00:8a:1e</macAddress>
         <privateIpAddress>10.0.1.233</privateIpAddress>
         <sourceDestCheck>true</sourceDestCheck>
         <groupSet>
           <item>
             <groupId>sg-a2a0b2ce</groupId>
             <groupName>quick-start-1</groupName>
           </item>
         </groupSet>
         <attachment>
           <attachmentId>eni-attach-a99c57c0</attachmentId>
           <instanceId>i-886401dc</instanceId>
           <instanceOwnerId>053230519467</instanceOwnerId>
           <deviceIndex>0</deviceIndex>
           <status>attached</status>
           <attachTime>2012-06-27T20:08:44.000Z</attachTime>
           <deleteOnTermination>true</deleteOnTermination>
         </attachment>
         <tagSet/>
         <privateIpAddressesSet>
           <item>
             <privateIpAddress>10.0.1.233</privateIpAddress>
             <primary>true</primary>
           </item>
           <item>
             <privateIpAddress>10.0.1.20</privateIpAddress>
             <primary>false</primary>
           </item>
         </privateIpAddressesSet>
       </item>
     </networkInterfaceSet>
</DescribeNetworkInterfacesResponse>