DescribeInstances
Description
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
Name | Description | Required |
---|---|---|
|
Type: |
Ancestor: None
Children: instancesSet
instancesSet
Instances set.
Type: DescribeInstancesInfoType
Ancestor: DescribeInstancesType
Children: item
Yes, but can be empty
item
Information for one instance set.
Type: DescribeInstancesItemType
Ancestor: instancesSet
Children: instanceId
No
instanceId
Instance IDs to describe.
Type: xsd:string
Default: Returns all instances.
Ancestor: item
Children: None
No
Response Elements
Name | Description |
---|---|
|
Type: DescribeInstancesResponseType Ancestor: None Children: |
|
The ID of the request. Type: xsd:string Ancestor: Children: None |
|
Reservation set. Type: ReservationSetType Ancestor: Children: |
|
Information for a reservation. Type: ReservationInfoType Ancestor: Children: |
|
Unique ID of the reservation. Type: xsd:string Ancestor: Children: None |
|
AWS Access Key ID of the user who owns the reservation. Type: xsd:string Ancestor: Children: None |
|
Group set. Type: GroupSetType Ancestor: Children: |
|
Group set item. Type: GroupItemType Ancestor: Children: |
|
Name of the security group. Type: xsd:string Ancestor: Children: None |
|
Instance set. Type: RunningInstancesSetType Ancestor: Children: |
|
Running instance set item. Type: RunningInstancesItemType Ancestor: Children: |
|
Unique ID of the instance launched. Type: xsd:string Ancestor: Children: None |
|
Image ID of the AMI used to launch the instance. Type: xsd:string Ancestor: Children: None |
|
The current state of the instance. Type: InstanceStateType Ancestor: Children: |
|
A 16-bit unsigned integer. The high byte is an opaque internal value and should be ignored. The low byte is set based on the state represented: Type: xsd:int Ancestor: Children: None |
|
The current state of the instance. Type: xsd:string Ancestor: Children: None |
|
The private DNS name assigned to the instance. This DNS name can only be used inside the Amazon EC2 network. This element remains empty until the instance enters a running state. Type: xsd:string Ancestor: Children: None |
|
The public DNS name assigned to the instance. This DNS name is contactable from outside the Amazon EC2 network. This element remains empty until the instance enters a running state. Type: xsd:string Ancestor: Children: None |
|
Reason for the most recent state transition. This might be an empty string. Type: xsd:string Ancestor: Children: None |
|
If this instance was launched with an associated key pair, this displays the key pair name. Type: xsd:string Ancestor: Children: None |
|
The AMI launch index, which can be used to find this instance within the launch group. For more information, go to the Metadata section of the Type: xsd:string Ancestor: Children: None |
|
Product codes attached to this instance. Type: ProductCodesSetType Ancestor: Children: |
|
Information for one product code. Type: ProductCodesSetItemType Ancestor: Children: |
|
Product code. Type: xsd:string Ancestor: Children: None |
|
The instance type. Type: xsd:string Ancestor: Children: None |
|
The time the instance launched. Type: xsd:dateTime Ancestor: Children: None |
|
The location where the instance launched. Type: PlacementResponseType Ancestor: Children: |
|
Returns the Availability Zones of the instances. Type: xsd:string Ancestor: Children: None |
|
Optional. Kernel associated with this instance. Type: xsd:string Ancestor: Children: None |
|
Optional. RAM disk associated with this instance. Type: xsd:string Ancestor: Children: None |
|
Platform of the instance (e.g., Windows). Type: xsd:string Ancestor: Children: None |
|
Specifies whether monitoring is enabled for the instance. Type: InstanceMonitoringStateType Ancestor: Children: |
|
State of monitoring for the instance. Type: xsd:string Valid Values: Ancestor: Children: None |
|
Specifies the subnet ID in which the instance is running (Amazon Virtual Private Cloud). Type: xsd:string Ancestor: Children: None |
|
Specifies the VPC in which the instance is running (Amazon Virtual Private Cloud). Type: xsd:string Ancestor: Children: None |
|
Specifies the private IP address that is assigned to the instance (Amazon VPC). Type: xsd:string Ancestor: Children: None |
|
Specifies the IP address of the instance. Type: xsd:string Ancestor: Children: None |
|
ID of the requester. Type: xsd:string Ancestor: Children: None |
Examples
Example Request
This example describes the current state of the instances owned by this user.
<DescribeInstances xmlns="http://ec2.amazonaws.com/doc/2009-08-15/"> <instancesSet/> </DescribeInstances>
Example Response
<DescribeInstancesResponse xmlns="http://ec2.amazonaws.com/doc/2009-08-15/"> <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> <item> <instanceId>i-28a64435</instanceId> <imageId>ami-6ea54007</imageId> <instanceState> <code>0</code> <name>running</name> </instanceState> <privateDnsName>10-251-50-134.ec2.internal</privateDnsName> <dnsName>ec2-72-44-33-6.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>