admin管理员组文章数量:1245899
I'm trying to create an AWS EventBridge rule, and I need to filter out events based on detail.type.
Each of these rules works separately:
Rule 1: This successfully filters out "foo-v2" and "bar-v2":
"detail": {
"type": [{
"anything-but": ["foo-v2", "bar-v2"]
}]
}
Rule 2:
This successfully filters out anything containing datasync:
"detail": {
"type": [{
"anything-but": {
"wildcard": "*datasync*"
}
}]
}
I've tried just about every different combination of these two but was not able to get one that was successful, does anyone have any advice on how I can combine both of these into one rule.
I'm trying to create an AWS EventBridge rule, and I need to filter out events based on detail.type.
Each of these rules works separately:
Rule 1: This successfully filters out "foo-v2" and "bar-v2":
"detail": {
"type": [{
"anything-but": ["foo-v2", "bar-v2"]
}]
}
Rule 2:
This successfully filters out anything containing datasync:
"detail": {
"type": [{
"anything-but": {
"wildcard": "*datasync*"
}
}]
}
I've tried just about every different combination of these two but was not able to get one that was successful, does anyone have any advice on how I can combine both of these into one rule.
Share Improve this question asked Feb 15 at 4:00 terrablterrabl 9243 gold badges11 silver badges24 bronze badges1 Answer
Reset to default 0You can use anything-but with wildcard and evaluate a set of items in a list.
Try adding just the wildcards for one of the items like the following:
"detail": {
"type": [{
"anything-but": {"wildcard": ["foo-v2", "bar-v2", "*datasync*"]}
}]
}
Comparison operators for use in event patterns in Amazon EventBridge
本文标签: Why can39t I combine multiple anythingbut conditions in AWS EventBridge event patternsStack Overflow
版权声明:本文标题:Why can't I combine multiple anything-but conditions in AWS EventBridge event patterns? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1740252584a2248774.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论