"userIdentity": {
"sessionContext": {
"sessionIssuer": {
"userName": [
{
"anything-but": {
"prefix": [
"abc-",
"xyz-"
]
}
}
]
}
}
}
"userIdentity": {
"sessionContext": {
"sessionIssuer": {
"userName": [
{
"anything-but": [{
"prefix": "abc-",
"prefix": "xyz-"
}]
}
]
}
}
}
在保存规则时发现以下错误:
“event模式是无效的。原因:除了列表外,启动| null |布尔值不支持。 我在语法中缺少某些内容,或者如果这是一个限制,那么该问题是否有其他选择?
您可以在事件模式中使用数组中的前缀。这是一个示例模式:
{
"detail": {
"alarmName": [{
"prefix": "DemoApp1"
},
{
"prefix": "DemoApp2"
}
],
"state": {
"value": [
"ALARM"
]
},
"previousState": {
"value": [
"OK"
]
}
}
}
或
demoapp2开头的警报TLDR:用户@samtoddler是正确的。 prefix仅适用于https://docs.aws.amazon.com/eventbridge/latest/userguide/content-filtering-with-with-event-patterns.html#filterwiltering-prefix-prefix-matchinging-中所调用的值。他们不使用阵列。您可以在AWS支持的情况下提交功能请求,但是如果您想解除自己的阻止;您最好控制用户名的前缀(猜想这与您的控制相关,并且在您的控制中)。
如果不可能;在发送到Compute(可能是Lambda)之前,请考虑通过其他属性进行过滤以进行其他过滤。{
"detail": {
"lastStatus": ["STOPPED"],
"stoppedReason": [{
"anything-but": {
"prefix": ["Task stopped by user", "Scaling activity initiated"]
}
}]
},
"detail-type": ["ECS Task State Change"],
"source": ["aws.ecs"]
}
这种配置有效。在the the the the the the the the the the the the the the the inthing in thepromixes节的文档中也有示例。
Https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-create-pattern-operators.html#eb-filtering-thing-anything but: 20prefixes