1 回答
- 最新
- 投票最多
- 评论最多
0
【以下的回答经过翻译处理】 我找到了解决我的(EventBridge)问题的方法,使用AWS Batch的“参数”选项来启动作业。
这是一种编写EventBridge规则的方法,可以匹配特定的参数集以进行过滤。
{
"source": ["aws.batch"],
"detail-type": ["Batch Job State Change"],
"detail": {
"parameters": {
"match_me_exactly": ["only-this-should-match"]
}
}
}
这将过滤掉来自像这样提交的作业的作业状态事件
batch_client.submit_job(
# other stuff here ...
parameters={"match_me_exactly": "only-this-should-match"}
)
其他类型的内容匹配可以从EventBridge的文档中找到https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-patterns-content-based-filtering.html#eb-filtering-complex-example。
相关内容
- AWS 官方已更新 1 年前
- AWS 官方已更新 2 年前
- AWS 官方已更新 7 个月前
- AWS 官方已更新 1 年前