title: Scale Windows Azure roles programmatically
body: <p>I am looking for some code that will scale a role to a given amount of instances given the roleID I want to scale.  I am looking for someone to implement this method.</p>
  
  <pre><code>Private Shared Sub DoScaleOperation(RoleID As String, InstanceCount As Integer)
      'TODO:
      'Check if the current number of instances in the role RoleID matches InstanctCount
      'and if the numbers don't match then scale down or scale up as appropriate.
  End Sub
  </code></pre>
  
  <p>This method should work for both the dev environment and the cloud environment.  Does anyone know how to do this?</p>
  
  <p>Also out curiorsity I an wondering what the names of the Role Instances will be on a scale up and what will be the names of the instances removed during a scale down.  I am hoping the names of the instances will be something like RoleID_(0 to InstanceCount - 1).</p>