Understanding Responses
In response to a request, the Amazon EC2 web service returns an XML data structure that conforms to
an XML schema defined as part of the Amazon EC2 WSDL. The structure of a XML response is
specific to the associated request. In general, the response datatypes with be named according to the
operation performed and whether the datatype is a container (may have children). Examples of
containers include 'groupSet' for security groups and 'instancesSet' for instances. Item elements are
children of containers and their contents vary according to the container's role.
An example response is:
<RunInstancesResponse xmlns="http://ec2.amazonaws.com/doc/2006-06-26">
<reservationId>r-47a5402e</reservationId>
<ownerId>UYY3TLBUXIEON5NQVUUX6OMPWBZIQNFM</ownerId>
<groupSet>
<item>
<groupId>default</groupId>
</item>
</groupSet>
<instancesSet>
<item>
<instanceId>i-2ba64342</instanceId>
<imageId>ami-60a54009</imageId>
<instanceState>
<code>0</code>
<name>pending</name>
</instanceState>
<dnsName></dnsName>
</item>
<item>
<instanceId>i-2bc64242</instanceId>
<imageId>ami-60a54009</imageId>
<instanceState>
<code>0</code>
<name>pending</name>
</instanceState>
<dnsName>domU-13-35-33-00-00-5C.dc2.compute.amazonaws.com</dnsName>
</item>
<item>
<instanceId>i-2be64332</instanceId>
<imageId>ami-60a54009</imageId>
<instanceState>
<code>0</code>
<name>pending</name>
</instanceState>
<dnsName>domU-12-34-28-00-00-5C.dc2.compute.amazonaws.com</dnsName>
</item>
</instancesSet>
</RunInstancesResponse>
Amazon EC2
Developer Guide
50
Additional Web Services References
Web Service Description Language (WSDL)
WS-Security BinarySecurityToken Profile
Amazon EC2
Developer Guide
51
Previous Page Next Page