[英]How do I disable cloudwatch monitoring of an instance via Ruby API?
I went over all the places in the API I thought this would be possible, didn't find anything. 我遍历了API中的所有地方,我认为这是可能的,但没有找到任何东西。
All these instances are in autoscale groups, I don't see in launch configs how to force this. 所有这些实例都在自动缩放组中,我在启动配置中看不到如何强制执行此操作。
It would be nice if new instances simply would have this disabled. 如果新实例只是禁用了此功能,那就太好了。 Thanks! 谢谢!
I don't know of any way to disable the monitor itself, but you can disable the actions. 我不知道有什么方法可以禁用监视器本身,但是您可以禁用操作。 Make sure you're using V2 of the API. 确保您使用的是API的V2。
cloudwatch = Aws::CloudWatch::Client.new(
region: region_name,
credentials: credentials
)
resp = cloudwatch.disable_alarm_actions(
# required
alarm_names: ["AlarmName", '...'],
)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.