云监控服务 CES-批量修改开启状态的一键告警关联告警规则的告警通知:请求参数

时间:2024-04-26 17:13:15

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

Content-Type

String

发送的实体的MIME类型。默认使用application/json; charset=UTF-8。

缺省值:application/json; charset=UTF-8

最小长度:1

最大长度:64

X-Auth-Token

String

用户Token

最小长度:1

最大长度:16384

表3 请求Body参数

参数

是否必选

参数类型

描述

notification_enabled

Boolean

是否开启告警通知

alarm_notifications

Array of SMNAction objects

告警触发的动作

ok_notifications

Array of SMNAction objects

告警恢复触发的动作

notification_begin_time

String

告警通知开启时间

notification_end_time

String

告警通知关闭时间

表4 SMNAction

参数

是否必选

参数类型

描述

type

String

通知类型,枚举类型:notification,autoscaling,groupwatch,ecsRecovery,contact,contactGroup,iecAction

枚举值:

  • notification

  • autoscaling

  • groupwatch

  • ecsRecovery

  • contact

  • contactGroup

  • iecAction

正则匹配:^(notification|autoscaling|groupwatch|ecsRecovery|contact|contactGroup|iecAction)$

notification_list

Array of strings

告警状态发生变化时,被通知对象的列表。topicUrn可从SMN获取,具体操作请参考查询Topic列表。当type为notification时,notificationList列表不能为空;当type为autoscaling时,列表必须为[]。 说明:若alarm_action_enabled为true,对应的alarm_actions、ok_actions至少有一个不能为空。若alarm_actions、ok_actions同时存在时,notificationList值保持一致。

数组长度:0 - 20

support.huaweicloud.com/api-ces/UpdateOneClickAlarmNotifications.html