lib/aws-sdk-cloudwatch/resource.rb in aws-sdk-cloudwatch-1.73.0 vs lib/aws-sdk-cloudwatch/resource.rb in aws-sdk-cloudwatch-1.74.0
- old
+ new
@@ -115,11 +115,13 @@
# specify the ARN of an SNS topic to find all alarms that send
# notifications to that topic.
# @return [Alarm::Collection]
def alarms(options = {})
batches = Enumerator.new do |y|
- resp = @client.describe_alarms(options)
+ resp = Aws::Plugins::UserAgent.feature('resource') do
+ @client.describe_alarms(options)
+ end
resp.each_page do |page|
batch = []
page.data.metric_alarms.each do |m|
batch << Alarm.new(
name: m.alarm_name,
@@ -213,11 +215,13 @@
# specify the ARN of an SNS topic to find all alarms that send
# notifications to that topic.
# @return [CompositeAlarm::Collection]
def composite_alarms(options = {})
batches = Enumerator.new do |y|
- resp = @client.describe_alarms(options)
+ resp = Aws::Plugins::UserAgent.feature('resource') do
+ @client.describe_alarms(options)
+ end
resp.each_page do |page|
batch = []
page.data.composite_alarms.each do |c|
batch << CompositeAlarm.new(
name: c.alarm_name,
@@ -287,10 +291,12 @@
# source account ID in this field, and also specify `true` for
# `IncludeLinkedAccounts`.
# @return [Metric::Collection]
def metrics(options = {})
batches = Enumerator.new do |y|
- resp = @client.list_metrics(options)
+ resp = Aws::Plugins::UserAgent.feature('resource') do
+ @client.list_metrics(options)
+ end
resp.each_page do |page|
batch = []
page.data.metrics.each do |m|
batch << Metric.new(
namespace: m.namespace,