title: Listing Instances in AWS .NET SDK
body: <p>I'm in the process of writing code to list out the Instance IDs and Instance Types using the .net SDK for AWS. I know I need to use the DescribeInstancesRequest class. I also think I need to use an ArrayList to store the string outputs and a foreach loop to grab all of the instances. I'm just having trouble putting it together! Something as simple as listing the Instance IDs in the console would be a great help to me.</p>
  
  <p>Has anyone done something similar? </p>
  
  <h3>UPDATE 10/13/2012</h3>
  
  <p>I'm making very tiny steps towards getting to where I need to be. I'm brand new to the .net AWS SDK so this is a very slow process. The code below counts the number of instances I have and returns it. Now I just need to figure out how to have it list the actual instance IDs.</p>
  
  <p>Any ideas?</p>
  
  <pre><code>AmazonEC2 ec2 = new AmazonEC2Client();
  
  DescribeInstancesRequest request = new DescribeInstancesRequest();
  DescribeInstancesResponse res = ec2.DescribeInstances(request);
  
  Console.WriteLine(res.DescribeInstancesResult.Reservation.Count);
  Console.Read();
  </code></pre>