title: How to programatically set the instance count for an Azure compute service
body: <p>I read <a href="http://social.msdn.microsoft.com/Forums/windowsazure/en-US/dbbf14d1-fd40-4aa3-8c65-a2424702816b/few-question-regarding-changing-instance-count-programmatically?forum=windowsazuredevelopment&amp;prof=required" rel="noreferrer">here</a> that it is possible to programmatically set the instance count of an Azure compute service role using the Rest API method <a href="http://msdn.microsoft.com/en-us/library/ee460809.aspx" rel="noreferrer">Change Deployment Configuration</a>.</p>
  
  <p>However the docs for that method don't mention role instances, just some cryptic extension properties. Does anyone know how this is done and can perhaps provide some pointers or a code snippet?</p>
  
  <p>It's not the AutoScaling that I'm interested in, but being able to set the exact number of instances in response to custom events.</p>