Issue with creating auto scale settings for Azure Virtual machine scale set Http status code 409

215 Views Asked by At

Issue with creating auto scale settings using azure monitor api

I am trying to create auto scale settings using azure monitor api. I am getting HTTP status code 409 which mentions that there might be name conflict on azure resources which is causing this issue. I tried multiple times with different names but still failed

PUT /subscriptions/{guid}/resourcegroups/{test}/providers/microsoft.insights/autoscalesettings/test1111?api-version=2015-04-01 HTTP/1.1
    {
  "location": "West US",
  "tags": {},
  "properties": {
    "profiles": [
      {
        "name": "test",
        "capacity": {
          "minimum": "1",
          "maximum": "10",
          "default": "1"
        },
        "rules": [
          {
            "metricTrigger": {
              "metricName": "Percentage CPU",
              "metricResourceUri": "/subscriptions/test/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc",
              "timeGrain": "PT1M",
              "statistic": "Average",
              "timeWindow": "PT5M",
              "timeAggregation": "Average",
              "operator": "GreaterThan",
              "threshold": 10
            },
            "scaleAction": {
              "direction": "Increase",
              "type": "ChangeCount",
              "value": "1",
              "cooldown": "PT5M"
            }
          },
          {
            "metricTrigger": {
              "metricName": "Percentage CPU",
              "metricResourceUri": "/subscriptions/test/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc",
              "timeGrain": "PT2M",
              "statistic": "Average",
              "timeWindow": "PT5M",
              "timeAggregation": "Average",
              "operator": "GreaterThan",
              "threshold": 15
            },
            "scaleAction": {
              "direction": "Decrease",
              "type": "ChangeCount",
              "value": "2",
              "cooldown": "PT6M"
            }
          }
        ]
      }
      }
      }

Below is the result I get and I could not get enough information what caused this

HTTP/1.1 409 Conflict
Content-Length: 98
Cache-Control: no-cache
Content-Type: application/json; charset=utf-8
Date: Fri, 18 Jan 2019 05:19:41 GMT
Expires: -1
Pragma: no-cache
Server: Microsoft-IIS/10.0
Strict-Transport-Security: max-age=31536000; includeSubDomains X-Content-Type-Options: nosniff

The expected result is that there should be clear message on what is causing this issue

0

There are 0 best solutions below