title: Programmatic method to identify Azure Log Analytics Available SKUs
body: <p>I am trying to create an ARM template to deploy an Azure Log Analytics Workspace via ARM.  The template works fine, except it needs to understand which SKUs are valid for the target subscription - PerGB2018 for new subscriptions or one of the older SKUs for non-migrated subscriptions.  </p>
  
  <p>Pricing models are detailed here: 
  <a href="https://docs.microsoft.com/en-gb/azure/monitoring-and-diagnostics/monitoring-usage-and-estimated-costs#new-pricing-model-and-operations-management-suite-subscription-entitlements" rel="nofollow noreferrer">https://docs.microsoft.com/en-gb/azure/monitoring-and-diagnostics/monitoring-usage-and-estimated-costs#new-pricing-model-and-operations-management-suite-subscription-entitlements</a></p>
  
  <p>Available SKUs for workspace creation are listed here:
  <a href="https://docs.microsoft.com/en-us/rest/api/loganalytics/workspaces/createorupdate" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/rest/api/loganalytics/workspaces/createorupdate</a></p>
  
  <p>I don't know how to identify which ones are valid for the specific subscription prior to deployment and end up with errors and failing deployments where the default I pick is not valid.  I cannot assume the person or system calling the template will understand and have access to the correct set of pricing SKUs.  PerGB2018 cannot be used on non-migrated subscriptions so cannot be my default.</p>
  
  <p>Can anyone share a method for determining which SKUs will work BEFORE trying to deploy and thus avoiding an error?  I have checked the Monitor and Billing APIs in case it is listed there but cannot see anything, and the network calls from the portal page don't offer much insight :(</p>
  
  <p>My preference is to avoid PowerShell as the rest of the deployment uses BASH to request deployment information and build out the parameter files.</p>
  
  <p>Thank You</p>