Sha256: 883167ac7abc5e5699238637d24ede0db6b5e11d96e2d6bc48e7c103cc6874cf

Contents?: true

Size: 1.48 KB

Versions: 98

Compression:

Stored size: 1.48 KB

Contents

module Fog
  module AWS
    class CloudWatch
      class Real
        require 'fog/aws/parsers/cloud_watch/describe_alarms_for_metric'

        # Retrieves all alarms for a single metric
        # ==== Options
        # * Dimensions<~Array>: a list of dimensions to filter against
        #     Name : The name of the dimension
        #     Value : The value to filter against
        # * MetricName<~String>: The name of the metric
        # * Namespace<~String>: The namespace of the metric
        # * Period<~Integer>: The period in seconds over which the statistic is applied
        # * Statistics<~String>: The statistic for the metric
        # * Unit<~String> The unit for the metric
        #
        # ==== Returns
        # * response<~Excon::Response>:
        #
        # ==== See Also
        # http://docs.amazonwebservices.com/AmazonCloudWatch/latest/APIReference/API_DescribeAlarms.html
        #

        def describe_alarms_for_metric(options)
          if dimensions = options.delete('Dimensions')
            options.merge!(AWS.indexed_param('Dimensions.member.%d.Name', dimensions.map {|dimension| dimension['Name']}))
            options.merge!(AWS.indexed_param('Dimensions.member.%d.Value', dimensions.map {|dimension| dimension['Value']}))
          end
          request({
              'Action'    => 'DescribeAlarmsForMetric',
              :parser     => Fog::Parsers::AWS::CloudWatch::DescribeAlarmsForMetric.new
            }.merge(options))
        end
      end
    end
  end
end

Version data entries

98 entries across 96 versions & 6 rubygems

Version Path
fog-aws-3.11.0 lib/fog/aws/requests/cloud_watch/describe_alarms_for_metric.rb
fog-aws-3.10.0 lib/fog/aws/requests/cloud_watch/describe_alarms_for_metric.rb
fog-aws-3.9.0 lib/fog/aws/requests/cloud_watch/describe_alarms_for_metric.rb
fog-aws-3.8.0 lib/fog/aws/requests/cloud_watch/describe_alarms_for_metric.rb
fog-aws-3.7.0 lib/fog/aws/requests/cloud_watch/describe_alarms_for_metric.rb
fog-aws-3.6.7 lib/fog/aws/requests/cloud_watch/describe_alarms_for_metric.rb
fog-aws-3.6.6 lib/fog/aws/requests/cloud_watch/describe_alarms_for_metric.rb
fog-aws-3.6.5 lib/fog/aws/requests/cloud_watch/describe_alarms_for_metric.rb
fog-aws-3.6.4 lib/fog/aws/requests/cloud_watch/describe_alarms_for_metric.rb
fog-aws-3.6.3 lib/fog/aws/requests/cloud_watch/describe_alarms_for_metric.rb
fog-aws-3.6.2 lib/fog/aws/requests/cloud_watch/describe_alarms_for_metric.rb
fog-aws-3.5.2 lib/fog/aws/requests/cloud_watch/describe_alarms_for_metric.rb
fog-aws-3.5.1 lib/fog/aws/requests/cloud_watch/describe_alarms_for_metric.rb
fog-aws-3.5.0 lib/fog/aws/requests/cloud_watch/describe_alarms_for_metric.rb
fog-aws-3.4.0 lib/fog/aws/requests/cloud_watch/describe_alarms_for_metric.rb
fog-aws-3.3.0 lib/fog/aws/requests/cloud_watch/describe_alarms_for_metric.rb
fog-aws-3.2.0 lib/fog/aws/requests/cloud_watch/describe_alarms_for_metric.rb
fog-aws-3.1.0 lib/fog/aws/requests/cloud_watch/describe_alarms_for_metric.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-aws-2.0.1/lib/fog/aws/requests/cloud_watch/describe_alarms_for_metric.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-aws-2.0.1/lib/fog/aws/requests/cloud_watch/describe_alarms_for_metric.rb