为AWS EventBridge创建通用规则触发含notify的detail-type事件
自定义事件规则配置方案
需求概述
要创建一条自定义事件规则,仅触发包含"notify"关键字的指定事件类型,拦截其余所有事件类型。
所有可用事件类型
com.expert.efg.input-portfolio-created:v1 com.expert.efg.published-portfolio-created:v1 com.expert.efg.published-portfolio:v1 com.expert.efg.portfolio-preparation.tolerance-check.notify.failure:v1 com.expert.efg.portfolio-preparation.tolerance-check.notify.success:v1 com.expert.efg.portfolio-preparation.apply-threshold.notify.success:v1 com.expert.efg.portfolio-preparation.apply-threshold.notify.failure:v1 com.expert.efg.published-portfolio.mi-report.notify.success:v1 com.expert.efg.published-portfolio.mi-report.notify.failure:v1
需触发的目标事件类型
com.expert.efg.portfolio-preparation.tolerance-check.notify.failure:v1 com.expert.efg.portfolio-preparation.tolerance-check.notify.success:v1 com.expert.efg.portfolio-preparation.apply-threshold.notify.success:v1 com.expert.efg.portfolio-preparation.apply-threshold.notify.failure:v1 com.expert.efg.published-portfolio.mi-report.notify.success:v1 com.expert.efg.published-portfolio.mi-report.notify.failure:v1
规则配置逻辑
有两种配置方式可选:
通配符匹配模式(简洁高效)
直接用以下匹配规则,即可精准命中所有含.notify.片段的目标事件,自动拦截其余事件:com.expert.efg.*.notify.*:v1逻辑说明:通配符
*匹配任意中间字符,确保只有包含.notify.且版本为v1的事件会被触发。枚举式匹配(严格精准)
如果需要完全限定触发范围,可直接将所有目标事件类型列在规则的允许列表中,避免意外命中其他潜在事件:com.expert.efg.portfolio-preparation.tolerance-check.notify.failure:v1 com.expert.efg.portfolio-preparation.tolerance-check.notify.success:v1 com.expert.efg.portfolio-preparation.apply-threshold.notify.success:v1 com.expert.efg.portfolio-preparation.apply-threshold.notify.failure:v1 com.expert.efg.published-portfolio.mi-report.notify.success:v1 com.expert.efg.published-portfolio.mi-report.notify.failure:v1
内容的提问来源于stack exchange,提问作者SDS
相关产品推荐
相关产品推荐

