创建报警规则
描述
创建报警规则,可以为某一个实例创建报警规则,也可以为多个实例同时创建报警规则。
请求方式
POST
请求参数
返回参数
错误编码
示例
- [backcolor=transparent]http[backcolor=transparent]:[backcolor=transparent]//metrics.cn-hangzhou.aliyuncs.com/
- [backcolor=transparent]POST[backcolor=transparent]请求体数据内容:
- [backcolor=transparent]Name[backcolor=transparent]:[backcolor=transparent] test_alarm
- [backcolor=transparent]Namespace[backcolor=transparent]:[backcolor=transparent] acs_ecs_dashboard
- [backcolor=transparent]MetricName[backcolor=transparent]:[backcolor=transparent] vm[backcolor=transparent].[backcolor=transparent]MemoryUtilization
- [backcolor=transparent]Dimensions[backcolor=transparent]:[{[backcolor=transparent]"instanceId"[backcolor=transparent]:[backcolor=transparent]"<your_ instanceId >"[backcolor=transparent],[backcolor=transparent]"userId"[backcolor=transparent]:[backcolor=transparent]"<your_ userId >"[backcolor=transparent]}]
- [backcolor=transparent]Period[backcolor=transparent]:[backcolor=transparent]900
- [backcolor=transparent]Statistics[backcolor=transparent]:[backcolor=transparent]Average
- [backcolor=transparent]ComparisonOperator[backcolor=transparent]:<=
- [backcolor=transparent]Threshold[backcolor=transparent]:[backcolor=transparent]35
- [backcolor=transparent]EvaluationCount[backcolor=transparent]:[backcolor=transparent]2
- [backcolor=transparent]ContactGroups[backcolor=transparent]:[[backcolor=transparent]"testgroup"[backcolor=transparent]]
- [backcolor=transparent]StartTime[backcolor=transparent]:[backcolor=transparent]6
- [backcolor=transparent]EndTime[backcolor=transparent]:[backcolor=transparent]20
- [backcolor=transparent]NotifyType[backcolor=transparent]:[backcolor=transparent]1
XML格式
- [backcolor=transparent]<CreateAlarmResponse>
- [backcolor=transparent] [backcolor=transparent]<Data>[backcolor=transparent]576fbae7-2fd1-411a-ae13-6f09f4fafdde[backcolor=transparent]</Data>
- [backcolor=transparent] [backcolor=transparent]<RequestId>[backcolor=transparent]58C699ED-84BE-44D5-B55F-84AFE73932AB[backcolor=transparent]</RequestId>
- [backcolor=transparent] [backcolor=transparent]<Success>[backcolor=transparent]true[backcolor=transparent]</Success>
- [backcolor=transparent] [backcolor=transparent]<Code>[backcolor=transparent]200[backcolor=transparent]</Code>
- [backcolor=transparent]</CreateAlarmResponse>
JSON格式
- [backcolor=transparent]{
- [backcolor=transparent] [backcolor=transparent]"Data"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"0c4af0f1-a864-468b-bed3-15c7deff75ee"[backcolor=transparent],[backcolor=transparent]
- [backcolor=transparent] [backcolor=transparent]"RequestId"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"910ABE4E-DC9D-4231-9DC0-C96835553327"[backcolor=transparent],[backcolor=transparent]
- [backcolor=transparent] [backcolor=transparent]"Success"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]true[backcolor=transparent],[backcolor=transparent]
- [backcolor=transparent] [backcolor=transparent]"Code"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"200"
- [backcolor=transparent]}