查询通知策略列表。
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | ListNotifications | 接口名称。当前 API 的名称为 ListNotifications 。 |
Version | String | 是 | 2018-01-01 | 接口版本。当前 API 的版本为 2018-01-01 。 |
Name | String | 否 | notification-demo | 基于告警通知策略名称进行筛选。 |
Levels | Array of String | 否 | notice | 基于告警通知等级进行筛选,取值:
|
RuleIds | Array of String | 否 | 189898***00 | 基于告警通知策略 ID 进行筛选。 |
PageNumber | Integer | 否 | 1 | 列表的页码,默认值为1。要查询的列表范围为:
|
PageSize | Integer | 否 | 10 | 分页查询时每页的行数,取值 > 0 ,默认值为 10。 |
POST https://open.volcengineapi.com?Action=ListNotifications&Version=2018-01-01 Content-Type: application/json { "Name": "notification-demo", "Levels": [ "notice" ], "RuleIds": [ "189898***00" ], "PageNumber": 1, "PageSize": 10 }
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
Data | Array of Notification | - | 通知策略详情。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
Id | String | 189898***00 | 通知策略 ID。 |
Name | String | notification-demo | 通知策略名称。 |
Levels | Array of String | notice | 告警通知等级。 |
CreatedAt | String | 2021-10-20T20:27:53+08:00 | 通知策略的创建时间。 |
UpdatedAt | String | 2021-10-20T20:27:53+08:00 | 通知策略的更新时间。 |
EffectEndAt | String | 23:59 | 通知策略生效的截止时间,格式为HH:MM,例如:23:59。 |
EffectStartAt | String | 00:00 | 通知策略生效的开始时间,格式为HH:MM ,例如:00:00。 |
Notifications | Array of NotificationNotify | - | 分级告警通知策略详情。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
Level | String | critical | 告警等级。 |
WebhookIds | Array of String | 18913208***4528 | Webhook 回调 ID。 |
AlertMethods | Array of String | 告警通知方式。 | |
ContactGroupIds | Array of String | 145080093687100**** | 告警联系组 ID。 |
{ "ResponseMetadata": { "Action": "ListNotifications", "Region": "cn-beijing", "Service": "Volc_Observe", "Version": "2018-01-01", "RequestId": "20230604110420****100232280022D31" }, "Result": { "Data": [ { "Id": "189898***00", "Name": "notification-demo", "Levels": [ "notice" ], "CreatedAt": "2021-10-20T20:27:53+08:00", "UpdatedAt": "2021-10-20T20:27:53+08:00", "EffectEndAt": "23:59", "EffectStartAt": "00:00", "Notifications": [ { "Level": "critical", "WebhookIds": [ "18913208***4528" ], "AlertMethods": [ "Email" ], "ContactGroupIds": [ "145080093687100****" ] } ] } ], "PageSize": 30, "PageNumber": 1, "TotalCount": 2 } }
本接口无特有的错误码。更多信息请参见 错误码。