We have a lot of event detail-type
. We need an event rule
to trigger the "notify"
event detail-type. Here are the list of all possible event detail-type:
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
We need a custom event rule
which is generic enough to trigger the following events detail-type
(having "notify"
) and block all other event detail-type
.
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
I used wildcard
option to fix the issue. The event rule
is as below:
{
"detail": {
"id": [{
"exists": true
}],
"source": [{
"exists": true
}],
"specversion": [{
"exists": true
}],
"type": [{
"exists": true
}]
},
"detail-type": [{
"wildcard": "com.expert.efg.*.notify.*"
}],
"source": [
"source"
]
}
reference – https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-create-pattern-operators.html