gpt4 book ai didi

amazon-web-services - 手动触发 AWS CloudWatch 事件

转载 作者:行者123 更新时间:2023-12-03 13:57:25 28 4
gpt4 key购买 nike

我在 CloudWatch 中有一个事件,每天触发一次。有没有办法手动触发事件(用于测试目的)?

...我意识到我可以增加事件触发计划的频率。

最佳答案

我还没有找到(并且我认为不可能)手动触发预定触发器。但是正如 danimal 提到的,您可以放置​​一个自定义事件来触发它。

# update your rule to trigger on a dummy-event source
# put-rule updates a rule if it exists or creates a new one if it doesn't
aws events put-rule --name "my-rule" --event-pattern "{\"source\":[\"karlanka\"]}"

# send an event with the same dummy source to trigger the rule
# Detail and DetailType are required but not used
aws events put-events --entries '[{"Source":"karlanka","DetailType":"X","Detail":"{}"}]'

# then change the rule back to your schedule
aws events put-rule --name "my-rule" --schedule-expression "rate(12 hours)"

关于amazon-web-services - 手动触发 AWS CloudWatch 事件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58034488/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com