弹性伸缩 AS-创建弹性伸缩策略(V2版本):请求示例

时间:2024-07-22 11:16:34

请求示例

创建一个名称为hth_aspolicy_1的告警策略,使用的告警规则ID为al1513822380493GvlJKZwA8,每当告警规则达到告警阈值后,该策略会使ID为8ade64b5-d685-40b8-8582-4ce306ea37a6的带宽增加1Mbit/s,直到带宽值达到限制10Mbit/s。
POST https://{Endpoint}/autoscaling-api/v2/{project_id}/scaling_policy

{ 
    "alarm_id": "al1513822380493GvlJKZwA8",
    "cool_down_time": 900,
    "scaling_resource_id": "8ade64b5-d685-40b8-8582-4ce306ea37a6",
    "scaling_resource_type": "BANDW IDT H",
    "scaling_policy_action": {
           "size": 1,
           "operation": "ADD",
           "limits": 10
    },
    "scaling_policy_name": "hth_aspolicy_1",
    "scaling_policy_type": "ALARM"
}
support.huaweicloud.com/api-as/as_06_0402.html