lib/aws-sdk-cloudwatch/metric.rb in aws-sdk-cloudwatch-1.90.0 vs lib/aws-sdk-cloudwatch/metric.rb in aws-sdk-cloudwatch-1.92.0
- old
+ new
@@ -61,11 +61,11 @@
#
# metric.reload.data
#
# @return [self]
def load
- resp = Aws::Plugins::UserAgent.feature('resource') do
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
@client.list_metrics(
metric_name: @name,
namespace: @namespace
)
end
@@ -181,11 +181,11 @@
else
self_copy.reload unless attempts == options[:max_attempts]
:retry
end
end
- Aws::Plugins::UserAgent.feature('resource') do
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
Aws::Waiters::Waiter.new(options).wait({})
end
end
# @!group Actions
@@ -302,11 +302,11 @@
def get_statistics(options = {})
options = options.merge(
namespace: @namespace,
metric_name: @name
)
- resp = Aws::Plugins::UserAgent.feature('resource') do
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
@client.get_metric_statistics(options)
end
resp.data
end
@@ -754,11 +754,11 @@
def put_alarm(options = {})
options = options.merge(
namespace: @namespace,
metric_name: @name
)
- Aws::Plugins::UserAgent.feature('resource') do
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
@client.put_metric_alarm(options)
end
Alarm.new(
name: options[:alarm_name],
client: @client
@@ -800,11 +800,11 @@
def put_data(options = {})
options = Aws::Util.deep_merge(options,
namespace: @namespace,
metric_data: [{ metric_name: @name }]
)
- resp = Aws::Plugins::UserAgent.feature('resource') do
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
@client.put_metric_data(options)
end
resp.data
end
@@ -845,10 +845,10 @@
batch = []
options = options.merge(
namespace: @namespace,
metric_name: @name
)
- resp = Aws::Plugins::UserAgent.feature('resource') do
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
@client.describe_alarms_for_metric(options)
end
resp.data.metric_alarms.each do |m|
batch << Alarm.new(
name: m.alarm_name,