我正在测试REST以创建一个自动缩放规则。然而,发生以下错误:
HTTP/1.1 500内部服务器错误 服务器遇到内部错误。请重试请求
我使用SOAPUI工具作为REST客户端。
这个请求显然是根据https://msdn.microsoft.com/en-us/library/azure/dn510372.aspx提出的
怎么了?
在哪里可以找到使用REST创建自动缩放的示例?
下面是json中的HTTP请求体
谢谢!
{
"Profiles": [
{
"Name": "name-of-profile-ONE",
"Capacity": {
"Minimum": "1",
"Maximum": "3",
"Default": "1"
},
"Rules": [
{
"MetricTrigger": {
"MetricName": "Percentage CPU",
"MetricNamespace": "",
"MetricSource": "/VirtualMachinesAvailabilitySet/test/set2",
"TimeGrain": "PT5M",
"Statistic": "Average",
"TimeWindow": "PT45M",
"TimeAggregation": "Average",
"Operator": "GreaterThanOrEqual",
"Threshold": "80"
},
"ScaleAction": {
"Direction": "Increase",
"Type": "ChangeCount",
"Value": "1",
"Cooldown": "PT20M"
},
},
{
"MetricTrigger": {
"MetricName": "Percentage CPU",
"MetricNamespace": "",
"MetricSource": "/VirtualMachinesAvailabilitySet/test/set2",
"TimeGrain": "PT5M",
"Statistic": "Average",
"TimeWindow": "PT45M",
"TimeAggregation": "Average",
"Operator": "LessThanOrEqual",
"Threshold": "60"
},
"ScaleAction": {
"Direction": "Decrease",
"Type": "ChangeCount",
"Value": "1",
"Cooldown": "PT20M"
},
},
],
}
],
"Enabled": true
} 发布于 2015-06-28 14:30:09
我在json身上发现了一个错误。跟着正确的json ..。
谢谢
{
"Profiles": [
{
"Name": "name-of-profile-UM",
"Capacity": {
"Minimum": "1",
"Maximum": "3",
"Default": "1"
},
"Rules": [
{
"MetricTrigger": {
"MetricName": "Percentage CPU",
"MetricNamespace": "",
"MetricSource": "/VirtualMachinesAvailabilitySet/romulo101s/set2",
"TimeGrain": "PT5M",
"Statistic": "Average",
"TimeWindow": "PT45M",
"TimeAggregation": "Average",
"Operator": "GreaterThanOrEqual",
"Threshold": "80"
},
"ScaleAction": {
"Direction": "Increase",
"Type": "ChangeCount",
"Value": "1",
"Cooldown": "PT20M"
}
},
{
"MetricTrigger": {
"MetricName": "Percentage CPU",
"MetricNamespace": "",
"MetricSource": "/VirtualMachinesAvailabilitySet/romulo101s/set2",
"TimeGrain": "PT5M",
"Statistic": "Average",
"TimeWindow": "PT45M",
"TimeAggregation": "Average",
"Operator": "LessThanOrEqual",
"Threshold": "60"
},
"ScaleAction": {
"Direction": "Decrease",
"Type": "ChangeCount",
"Value": "1",
"Cooldown": "PT20M"
}
}
]
}
],
"Enabled": true
}https://stackoverflow.com/questions/31089255
复制相似问题