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 of which to get the status. Type: String |
No |
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
https://ec2.amazonaws.com/ ?Action=DescribeInstances &InstanceId.1=i-28a64341 &...auth parameters...
Sample Response
<DescribeInstancesResponse xmlns="http://ec2.amazonaws.com/doc/2008-05-05"> <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-75.ec2.internal</privateDnsName> <dnsName>ec2-72-44-33-4.compute-1.amazonaws.com</dnsName> <keyName>example-key-name</keyName> <productCodesSet> <item><productCode>774F4FF8</productCode></item> </productCodesSet> <InstanceType>m1.small</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>