使用 azure monitor api 创建自动缩放设置的问题
我正在尝试使用 azure monitor api 创建自动缩放设置。我收到 HTTP 状态代码 409,其中提到可能存在导致此问题的 azure 资源名称冲突。我用不同的名字尝试了多次,但仍然失败
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"
}
}
]
}
}
}
以下是我得到的结果,我无法获得足够的信息是什么导致了这个
HTTP/1.1 409 冲突
内容长度:98
缓存控制:无缓存
内容类型:应用程序/json;charset=utf-8
日期:格林威治标准时间 2019 年 1 月 18 日星期五 05:19:41
过期:-1
编译指示:无缓存
服务器:Microsoft-IIS/10.0
Strict-Transport-Security:max-age=31536000;includeSubDomains X-Content-Type-Options: nosniff
预期结果是应该有明确的信息说明导致此问题的原因