首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用management创建自动缩放时出错

使用management创建自动缩放时出错
EN

Stack Overflow用户
提问于 2015-06-27 13:19:39
回答 1查看 93关注 0票数 1

我正在测试REST以创建一个自动缩放规则。然而,发生以下错误:

HTTP/1.1 500内部服务器错误 服务器遇到内部错误。请重试请求

我使用SOAPUI工具作为REST客户端。

这个请求显然是根据https://msdn.microsoft.com/en-us/library/azure/dn510372.aspx提出的

怎么了?

在哪里可以找到使用REST创建自动缩放的示例?

下面是json中的HTTP请求体

谢谢!

代码语言:javascript
复制
{
"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
}   
EN

回答 1

Stack Overflow用户

发布于 2015-06-28 14:30:09

我在json身上发现了一个错误。跟着正确的json ..。

谢谢

代码语言:javascript
复制
{
"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
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/31089255

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档