获取报警历史
下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。
参数 | 类型 | 是否必填 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | ListAlarmHistory | 要执行的操作,取值:ListAlarmHistory。 |
Version | String | 是 | 2022-07-01 | API的版本,取值:2022-07-01。 |
ProviderCode | String | 否 | iam | 服务方code |
QuotaCode | String | 否 | policy | 配额code |
QuotaType | String | 否 | normal | 配额类型 |
RuleName | String | 否 | rule1 | 规则名 |
AlertTimeStart | String | 否 | 2025-04-29T00:00:00 | 告警历史开始时间 |
AlertTimeEnd | String | 否 | 2025-04-29T00:00:00 | 告警历史结束时间 |
NextToken | String | 否 | 100 | 分页参数 |
MaxResults | Integer | 否 | 10 | 分页参数 |
下表仅列出本接口特有的返回参数。更多信息请参见返回结构。
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
AlarmRecordList | Array of Object | {"RuleID":"","ProviderCode":"platformServices","ProductName":"平台服务","QuotaCode":"ws_quota_tongyong4","QuotaType":"normal","Dimensions":"[{"Name":"region_code","Value":""}]","RuleName":"测试告警邮件","AlarmType":"usage","Threshold":"30.1","AlarmValue":"30.799999","MetricUnit":"Percent","AlarmTime":"2022-12-14 10:27:43","SendMessageStatus":-1} | 告警历史 |
NextToken | String | 100 | 分页参数 |
http://open.volcengineapi.com/?Version=2022-07-01&Action=ListAlarmHistory &ProviderCode=platformServices &QuotaCode=quota_test &RuleName=策略名 &MaxResults=1
{ "ResponseMetadata": { "RequestId": "2022122213050631C0FB91AA8495CE8F94" }, "Result": { "AlarmRecordList": [ { "RuleID": "1605781619627524096", "ProviderCode": "platformServices", "ProductName": "平台服务", "QuotaCode": "quota_test", "QuotaType": "normal", "Dimensions": "[{\"Name\":\"region_code\",\"Value\":\"\"}]", "RuleName": "策略名", "ReportWays": [ "Inmail" ], "AlarmType": "usage", "Threshold": "10", "AlarmValue": "12.000000", "MetricUnit": "Count", "AlarmTime": "2022-12-15 18:03:51" } ], "NextToken": "392354" } }
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。
状态码 | 错误码 | 说明 |
---|---|---|
400 | InvalidParameter | 无效参数 |
500 | ServiceFailure | 服务错误 |