title: How to find maximum update domains/fault domains available in an Azure region
body: <p>The only way I know of to enquire maximum update domains or fault domains allowed for creation of an avaiability set in Azure is by passing very large values and then parsing the error message. Is there a better way to query for the maximum values?</p>
  
  <p>For example, executing <code>New-AzureRmAvailabilitySet -PlatformUpdateDomainCount 100 -PlatformFaultDomainCount 100 &lt;other parameters&gt;</code> will fail with an error that looks like below:</p>
  
  <pre><code>ErrorCode: InvalidParameter
  ErrorMessage: The specified fault domain count 100 must fall in the range 1 to 2.
  StatusCode: 400
  ReasonPhrase: Bad Request
  </code></pre>