{"base_path":"/","components":null,"consumes":"","definitions":{"AlertNoticeConfigResponse":{"example":{"enabled":true,"enterprise_project_id":"0","id":"85b8db31f300427cbba62ba8b33cf263","is_all_enterprise_project":true,"name":"test","notice_class":"threat_alert_notice","sendfreq":30,"times":1,"topic_urn":"urn:smn:cn-north-7:550500b49078408682d0d4f7d923f3e1:ces_lgs_test"},"properties":{"enabled":{"description":"是否开启 \n - false: 不开启 \n - true: 开启","type":"boolean"},"enterprise_project_id":{"description":"企业项目ID","type":"string"},"id":{"description":"ID","type":"string"},"is_all_enterprise_project":{"default":true,"description":"是否是所有企业项目","type":"boolean"},"locale":{"description":"语言","type":"string"},"name":{"description":"告警通知名称","type":"string"},"nearly_expired_time":{"description":"提前通知天数","type":"string"},"notice_class":{"description":"通知类型","type":"string"},"prefer_html":{"default":false,"description":"预留参数,可忽略","type":"boolean"},"sendfreq":{"description":"时间间隔,单位为分钟。当通知类型为防护事件时,该参数表示在该时间间隔内,攻击次数等于或者大于设定阈值时,将发送告警通知,支持的值:5、15、30、60、120、360、720、1440;当通知类型为证书到期时,该参数表示每隔多长时间发送一次告警通知,支持的值1天、1周(需要转换成分钟)。","format":"int32","type":"integer"},"threat":{"description":"事件类型","items":{"type":"string"},"type":"array"},"times":{"default":1,"description":"当通知类型为防护事件时,需要填写该参数。在该时间间隔内,当攻击次数大于或等于您设置的阈值时才会发送告警通知","format":"int32","type":"integer"},"topic_urn":{"description":"主题","type":"string"},"update_time":{"description":"更新时间","format":"int64","type":"integer"}}},"CreateAlertNoticeConfigBody":{"example":{"description":"","enabled":true,"is_all_enterprise_project":true,"local":"zh-cn","name":"testa","notice_class":"threat_alert_notice","prefer_html":false,"sendfreq":30,"threat":["all"],"times":1,"topic_urn":"urn:smn:cn-north-7:f116e3217cd84c88a979f95e5842a637:sonar_test_2cdab"},"properties":{"description":{"description":"**参数解释:**\n描述,对告警通知配置的补充说明\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","type":"string"},"enabled":{"default":true,"description":"**参数解释:**\n功能启用状态:true表示启用当前配置,false表示禁用。\n**约束限制:**\n不涉及\n**取值范围:**\n- true\n- false\n\n**默认取值:**\ntrue","type":"boolean"},"is_all_enterprise_project":{"description":"**参数解释:**\n是否所有企业项目,标识该告警配置是否适用于所有企业项目\n**约束限制:**\n不涉及\n**取值范围:**\n- true\n- false\n\n**默认取值:**\ntrue","type":"boolean"},"local":{"default":"zh-cn","description":"**参数解释:**\n地区,指定告警通知的语言或地域相关配置\n**约束限制:**\n不涉及\n**取值范围:**\n- zh-cn\n- en-us\n\n**默认取值:**\n不涉及","type":"string"},"name":{"description":"**参数解释:**\n告警名称,用于标识告警通知配置的名称\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","type":"string"},"nearly_expired_time":{"description":"**参数解释:**\n提前通知天数,针对过期类告警提前发送通知的天数\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","format":"int64","type":"integer"},"notice_class":{"default":"threat_alert_notice","description":"**参数解释:**\n告警类型,区分不同场景的告警(如防护规则触发、资源异常等)\n**约束限制:**\n不涉及\n**取值范围:**\n- threat_alert_notice:威胁告警通知 \n- cert_alert_notice:证书告警通知,\n- rule_alert_notice:规则告警通知,\n- cname_ip_alert_notice:域名 / IP 告警通知\n\n**默认取值:**\n不涉及","type":"string"},"prefer_html":{"default":false,"description":"**参数解释:**\n预留参数,默认为false\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\nfalse","type":"boolean"},"rule_type":{"default":["all"],"description":"**参数解释:**\n指定需要告警的规则类型,[\"all\"]表示所有规则类型。\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\nall","items":{"type":"string"},"type":"array"},"sendfreq":{"default":30,"description":"**参数解释:**\n通间间隔,单位为分钟。当通知类型为防护事件时,该参数表示在该时间间隔内,攻击次数等于或者大于设定阈值时,将发送告警通知,支持的值:5、15、30、60、120、360、720、1440;当通知类型为证书到期时,该参数表示每隔多长时间发送一次告警通知,支持的值为1440、10080(单位为分钟)。\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","type":"integer"},"threat":{"default":["all"],"description":"**参数解释:**\n威胁类型范围:指定需要告警的威胁类型,如[\"all\"]表示所有威胁\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\nall","items":{"type":"string"},"type":"array"},"times":{"default":1,"description":"**参数解释:**\n当通知类型为防护事件时,需要填写该参数。在该时间间隔内,当攻击次数大于或等于您设置的阈值时才会发送告警通知\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","type":"integer"},"topic_urn":{"description":"**参数解释:**\n通知模板,关联用于发送告警通知的SMN主题URN,通过“消息通知服务”获取\n查询可使用的主题,通过 云日志服务的“查询SMN主题”接口,返回体中的\"topic_urn\"字段\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","type":"string"}},"required":["enabled","prefer_html","local","is_all_enterprise_project","notice_class","name","topic_urn"]},"IAM5ErrorDetails":{"description":"调用下游服务的报错信息集合,IAM5鉴权错误时才会返回此信息0。","properties":{"error_code":{"description":"下游服务错误码","type":"string"},"error_msg":{"description":"下游服务报错信息","type":"string"}}},"RestErrorResponse":{"properties":{"details":{"description":"调用下游服务的报错信息集合,IAM5鉴权错误时才会返回此字段。","items":{"$ref":"#/definitions/IAM5ErrorDetails"},"type":"array"},"encoded_authorization_message":{"description":"编码 (加密) 后的详细拒绝原因,用户可以自行调用 STS 服务的decode-authorization-message接口进行解码,可参考STS5联调自验证。IAM5鉴权错误时才会返回此字段。","type":"string"},"error_code":{"description":"错误码","type":"string"},"error_msg":{"description":"错误信息","type":"string"}},"title":"RestErrorResponse","type":"object"}},"description":null,"group_id":"29975c0bd7ce463ca70ad5c074e3974b","host":"waf.cn-north-4.myhuaweicloud.com","id":"95775e6478f44661bcacf5d6475922da","info_version":"v1","method":"post","name":"CreateAlertNoticeConfig","parameters":{},"paths":{"/v2/{project_id}/waf/alert":{"post":{"description":"创建告警通知","operationId":"CreateAlertNoticeConfig","parameters":[{"description":"**参数解释:**\n项目ID,对应控制台用户名->我的凭证->项目列表->项目ID。\n**约束限制:**\n不涉及\n**取值范围:**\n只能由英文字母、数字组成,且长度为32个字符。\n**默认取值:**\n不涉及","in":"path","name":"project_id","required":true,"type":"string"},{"description":"**参数解释:**\n语言,默认值为en-us。zh-cn(中文)/en-us(英文)\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\nzh-cn","in":"header","name":"X-Language","required":true,"type":"string"},{"description":"**参数解释:**\n租户token\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","in":"query","name":"X-Auth-Token","required":true,"type":"string"},{"default":"application/json;charset=utf8","description":"**参数解释:**\n内容类型\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\napplication/json;charset=utf8","in":"query","name":"Content-Type","required":true,"type":"string"},{"description":"**参数解释:**\n您可以通过调用企业项目管理服务(EPS)的查询企业项目列表接口(ListEnterpriseProject)查询企业项目ID。若需要查询当前用户所有企业项目绑定的资源信息,请传参all_granted_eps。\n**约束限制:**\n不涉及\n**取值范围:**\n - 0:代表default企业项目\n - all_granted_eps:代表所有企业项目\n - 其它企业项目ID:长度为36个字符\n\n**默认取值:**\n0","in":"query","name":"enterpriseProjectId","required":true,"type":"string"},{"description":"**参数解释:**\n请求Body\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","in":"body","name":"alertNoticeConfig","required":true,"schema":{"$ref":"#/definitions/CreateAlertNoticeConfigBody"}}],"produces":["application/json"],"responses":{"200":{"description":"**参数解释:**\n请求成功\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","examples":{"application/json":{"enabled":true,"enterprise_project_id":"0","id":"85b8db31f300427cbba62ba8b33cf263","is_all_enterprise_project":true,"locale":"zh-cn","name":"test","notice_class":"threat_alert_notice","sendfreq":30,"times":1,"topic_urn":"urn:smn:cn-north-7:550500b49078408682d0d4f7d923f3e1:ces_lgs_test"}},"schema":{"$ref":"#/definitions/AlertNoticeConfigResponse"}},"400":{"description":"**参数解释:**\n请求失败\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","schema":{"$ref":"#/definitions/RestErrorResponse"}},"401":{"description":"**参数解释:**\ntoken权限不足\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","schema":{"$ref":"#/definitions/RestErrorResponse"}},"500":{"description":"**参数解释:**\n服务器内部错误\n**约束限制:**\n不涉及\n**取值范围:**\n不涉及\n**默认取值:**\n不涉及","schema":{"$ref":"#/definitions/RestErrorResponse"}}},"summary":"创建告警通知","tags":["告警管理"],"x-api-type":"open-api","x-support-sdk":"Y"}}},"product_short":"WAF","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":null,"summary":"创建告警通知","tags":"告警管理","uri":null,"version":"2.0"}