azure - BadRequest on 'Update autoscale settings' in ARM template deployment -


i'm trying apply scaling settings availability set in templated deployment. i've not been able find complete examples of particular use case in azure-quickstart-templates compare against, , error incorrect syntax uninformative 'badrequest' no other information.

here's autoscale settings template (which otherwise deploys fine)...

{     "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" } 

does have insights? i've constructed based on response format found here , autoscaling examples web sites service found in quickstart library.

edit:

a little more information having experimented azure cli tool...

~/ $ 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 location 'northeurope' , api version '2014-04-01' type 'availabilitysets'. supported api-versions '2014-12-01-preview, 2015-05-01-preview, 2015-06-15'. supported locations 'eastus, eastus2, westus, centralus, southcentralus, northeurope, westeurope, eastasia, southeastasia, japaneast, japanwest'. 

perhaps i'm trying isn't possible @ moment?

the azure powershell module doesn't yet support direct configuration of azure autoscale properties, we'll want leverage combination of azure powershell , azure service management rest api operations autoscaling. rest api provides operations adding, deleting, updating , retrieving autoscale configurations.

ref: http://blogs.technet.com/b/keithmayer/archive/2015/02/16/automating-azure-autoscale-via-powershell-and-rest-api.aspx

http://blogs.technet.com/b/keithmayer/archive/2015/07/20/managing-azure-resources-with-azure-resource-manager-arm-and-powershell.aspx

hope helps you.

girish prajwal


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -