0

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

mgopi
  • 59
  • 1
  • 4
  • 1
    Often there is a payload with the response with more info. What are you using to submit the request? HTTP 409 does not necessarily mean there is something wrong with the name. If you have information that indicates it might, please share https://httpstatuses.com/409 – Nick.Mc Jan 18 '19 at 06:05
  • There is no information in payload except that it is HTTP conflict. Just waiting to see if someone got the same error recently as I did not find similar question – mgopi Jan 19 '19 at 06:23

0 Answers0