title: BadRequest on 'Update autoscale settings' in ARM template deployment
body: <p>I'm trying to apply scaling settings to an availability set in a templated deployment. I've not been able to find any complete examples of this particular use case in the azure-quickstart-templates to compare against, and the error for incorrect syntax is an uninformative 'BadRequest' with no other information.</p>
  
  <p>Here's my autoscale settings from the template (which otherwise deploys fine)...</p>
  
  <pre><code>{
      "apiVersion": "2014-04-01",
      "dependsOn": [
          "Microsoft.Compute/availabilitySets/workersas"
      ],
      "location": "[resourceGroup().location]",
      "name": "workersscaling",
      "properties": {
          "enabled": true,
          "name": "workersscaling",
          "profiles": [
              {
                  "capacity": {
                      "default": 2,
                      "maximum": 4,
                      "minimum": 2
                  },
                  "name": "Default",
                  "rules": [
                      {
                          "metricTrigger": {
                              "metricName": "Percentage CPU",
                              "metricNamespace": "",
                              "metricResourceUri": "[resourceId('Microsoft.Compute/availabilitySets', 'workersas')]",
                              "operator": "GreaterThan",
                              "statistic": "Average",
                              "threshold": 80.0,
                              "timeAggregation": "Average",
                              "timeGrain": "PT1M",
                              "timeWindow": "PT10M"
                          },
                          "scaleAction": {
                              "cooldown": "PT10M",
                              "direction": "Increase",
                              "type": "ChangeCount",
                              "value": "1"
                          }
                      },
                      {
                          "metricTrigger": {
                              "metricName": "Percentage CPU",
                              "metricNamespace": "",
                              "metricResourceUri": "[resourceId('Microsoft.Compute/availabilitySets', 'workersas')]",
                              "operator": "LessThan",
                              "statistic": "Average",
                              "threshold": 40.0,
                              "timeAggregation": "Average",
                              "timeGrain": "PT1M",
                              "timeWindow": "PT10M"
                          },
                          "scaleAction": {
                              "cooldown": "PT10M",
                              "direction": "Decrease",
                              "type": "ChangeCount",
                              "value": "1"
                          }
                      }
                  ]
              }
          ],
          "targetResourceUri": "[resourceId('Microsoft.Compute/availabilitySets', 'workersas')]"
      },
      "type": "microsoft.insights/autoscalesettings"
  }
  </code></pre>
  
  <p>Does anyone have any insights? I've constructed this based on the <a href="https://msdn.microsoft.com/en-us/library/azure/dn931946.aspx" rel="nofollow">response format found here</a> and autoscaling examples for the web sites service found in the quickstart library.</p>
  
  <p>EDIT:</p>
  
  <p>A little more information having experimented with the Azure CLI tool...</p>
  
  <pre><code>~/ $ azure insights metrics definition list /subscriptions/.../resourceGroups/snrg/providers/Microsoft.Compute/availabilitySets/workersasinfo:    Executing command insights metrics definition list
  + Querying ""
  error:   No registered resource provider found for location 'northeurope' and API version '2014-04-01' for type 'availabilitySets'. The supported api-versions are '2014-12-01-preview, 2015-05-01-preview, 2015-06-15'. The supported locations are 'eastus, eastus2, westus, centralus, southcentralus, northeurope, westeurope, eastasia, southeastasia, japaneast, japanwest'.
  </code></pre>
  
  <p>Perhaps what I'm trying to do simply isn't possible at the moment?</p>