DescribeInstances
The DescribeInstances
operation returns
information about instances that you own.
If you specify one or more instance IDs, Amazon EC2 returns information for those instances. If you do not specify instance IDs, Amazon EC2 returns information for all relevant instances. If you specify an invalid instance ID, a fault is returned. If you specify an instance that you do not own, it will not be included in the returned results.
Recently terminated instances might appear in the returned results. This interval is usually less than one hour.
Request Parameters
The following table describes the request parameters for
DescribeInstances
. Parameter names are case
sensitive.
Name | Description | Required |
---|---|---|
|
Set of instances IDs to get the status of. Type: xsd:string[] Default: none Valid Values: Can be empty Constraints: none |
Yes |
Response Elements
The following table describes the default response tags included
in DescribeInstances
responses.
Name | Description |
---|---|
|
A list of structures describing the status of all requested instances. Type: ReservationInfoType[] |
Sample Request
<DescribeInstances xmlns="http://ec2.amazonaws.com/doc/2009-03-01/"> <instancesSet> <item> <instanceId>i-28a64341</instanceId> </item> </instancesSet> </DescribeInstances>
Sample Response
<DescribeInstancesResponse xmlns="http://ec2.amazonaws.com/doc/2009-03-01/"> <reservationSet> <item> <reservationId>r-44a5402d</reservationId> <ownerId>UYY3TLBUXIEON5NQVUUX6OMPWBZIQNFM</ownerId> <groupSet> <item> <groupId>default</groupId> </item> </groupSet> <instancesSet> <item> <instanceId>i-28a64341</instanceId> <imageId>ami-6ea54007</imageId> <instanceState> <code>0</code> <name>running</name> </instanceState> <privateDnsName>10-251-50-132.ec2.internal</privateDnsName> <dnsName>ec2-72-44-33-4.compute-1.amazonaws.com</dnsName> <keyName>example-key-name</keyName> <amiLaunchIndex>23</amiLaunchIndex> <productCodesSet> <item><productCode>774F4FF8</productCode></item> </productCodesSet> <instanceType>m1.large</instanceType> <launchTime>2007-08-07T11:54:42.000Z</launchTime> <placement> <availabilityZone>us-east-1b</availabilityZone> </placement> <kernelId>aki-ba3adfd3</kernelId> <ramdiskId>ari-badbad00</ramdiskId> </item> </instancesSet> </item> </reservationSet> </DescribeInstancesResponse>