Sha256: 539ec2172e0939d79ecef5426e864b05d28eaa45934dee98fa4b288e9863a25e
Contents?: true
Size: 511 Bytes
Versions: 5
Compression:
Stored size: 511 Bytes
Contents
module Awspec::Helper module Finder module Cloudwatch def find_cloudwatch_alarm(id) res = @cloudwatch_client.describe_alarms({ alarm_names: [id] }) return res[:metric_alarms].first if res[:metric_alarms].count == 1 res = @cloudwatch_client.describe_alarms res[:metric_alarms].find do |alarm| alarm[:alarm_arn] == id end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems