2011-09-29 17:55:48 -04:00
|
|
|
module Fog
|
|
|
|
module AWS
|
|
|
|
class CloudWatch
|
|
|
|
class Real
|
2011-09-30 14:49:10 -04:00
|
|
|
|
2011-10-03 19:12:45 -04:00
|
|
|
require 'fog/aws/parsers/cloud_watch/describe_alarms'
|
2011-09-30 14:49:10 -04:00
|
|
|
|
2011-10-03 19:12:45 -04:00
|
|
|
# Retrieves alarms with the specified names
|
2011-09-29 17:55:48 -04:00
|
|
|
# ==== Options
|
2011-09-30 13:55:43 -04:00
|
|
|
# * ActionPrefix<~String>: The action name prefix
|
|
|
|
# * AlarmNamePrefix<~String>: The alarm name prefix.
|
2011-10-03 19:12:45 -04:00
|
|
|
# AlarmNames cannot be specified if this parameter is specified
|
2011-09-30 14:49:10 -04:00
|
|
|
# * AlarmNames<~Array>: A list of alarm names to retrieve information for.
|
2011-09-30 13:55:43 -04:00
|
|
|
# * MaxRecords<~Integer>: The maximum number of alarm descriptions to retrieve
|
|
|
|
# * NextToken<~String>: The token returned by a previous call to indicate that there is more data available
|
|
|
|
# * NextToken<~String> The token returned by a previous call to indicate that there is more data available
|
|
|
|
# * StateValue<~String>: The state value to be used in matching alarms
|
2011-09-29 17:55:48 -04:00
|
|
|
#
|
|
|
|
# ==== Returns
|
|
|
|
# * response<~Excon::Response>:
|
|
|
|
#
|
|
|
|
# ==== See Also
|
|
|
|
# http://docs.amazonwebservices.com/AmazonCloudWatch/latest/APIReference/API_DescribeAlarms.html
|
|
|
|
#
|
2011-09-30 14:49:10 -04:00
|
|
|
|
2011-09-30 13:55:43 -04:00
|
|
|
def describe_alarms(options={})
|
|
|
|
if alarm_names = options.delete('AlarmNames')
|
|
|
|
options.merge!(AWS.indexed_param('AlarmNames.member.%d', [*alarm_names]))
|
2011-09-29 17:55:48 -04:00
|
|
|
end
|
|
|
|
request({
|
|
|
|
'Action' => 'DescribeAlarms',
|
2011-09-30 13:55:43 -04:00
|
|
|
:parser => Fog::Parsers::AWS::CloudWatch::DescribeAlarms.new
|
2011-09-29 17:55:48 -04:00
|
|
|
}.merge(options))
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2011-10-03 18:34:59 -04:00
|
|
|
end
|