Sha256: f81861581b1cdc365c456fff827152b0ab0801f8548d40edb965c25d79b703a3

Contents?: true

Size: 1.79 KB

Versions: 98

Compression:

Stored size: 1.79 KB

Contents

module Fog
  module AWS
    class AutoScaling
      class Real
        require 'fog/aws/parsers/auto_scaling/basic'

        # Disables monitoring of group metrics for the Auto Scaling group
        # specified in AutoScalingGroupName. You can specify the list of
        # affected metrics with the Metrics parameter.
        #
        # ==== Parameters
        # * 'AutoScalingGroupName'<~String> - The name or ARN of the Auto
        #   Scaling group.
        # * options<~Hash>:
        #   * Metrics<~Array> - The list of metrics to disable. If no metrics
        #     are specified, all metrics are disabled.
        #
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Hash>:
        #     * 'ResponseMetadata'<~Hash>:
        #       * 'RequestId'<~String> - Id of request
        #
        # ==== See Also
        # http://docs.amazonwebservices.com/AutoScaling/latest/APIReference/API_DisableMetricsCollection.html
        #
        def disable_metrics_collection(auto_scaling_group_name, options = {})
          if metrics = options.delete('Metrics')
            options.merge!(AWS.indexed_param('Metrics.member.%d', [*metrics]))
          end
          request({
            'Action'               => 'DisableMetricsCollection',
            'AutoScalingGroupName' => auto_scaling_group_name,
            :parser                => Fog::Parsers::AWS::AutoScaling::Basic.new
          }.merge!(options))
        end
      end

      class Mock
        def disable_metrics_collection(auto_scaling_group_name, options = {})
          unless self.data[:auto_scaling_groups].key?(auto_scaling_group_name)
            Fog::AWS::AutoScaling::ValidationError.new("Group #{auto_scaling_group_name} not found")
          end

          Fog::Mock.not_implemented
        end
      end
    end
  end
end

Version data entries

98 entries across 96 versions & 6 rubygems

Version Path
fog-aws-0.8.1 lib/fog/aws/requests/auto_scaling/disable_metrics_collection.rb
fog-aws-0.8.0 lib/fog/aws/requests/auto_scaling/disable_metrics_collection.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-aws-0.7.5/lib/fog/aws/requests/auto_scaling/disable_metrics_collection.rb
fog-aws-0.7.6 lib/fog/aws/requests/auto_scaling/disable_metrics_collection.rb
fog-aws-0.7.5 lib/fog/aws/requests/auto_scaling/disable_metrics_collection.rb
fog-aws-0.7.4 lib/fog/aws/requests/auto_scaling/disable_metrics_collection.rb
fog-aws-0.7.3 lib/fog/aws/requests/auto_scaling/disable_metrics_collection.rb
fog-aws-0.7.2 lib/fog/aws/requests/auto_scaling/disable_metrics_collection.rb
fog-aws-0.6.0 lib/fog/aws/requests/auto_scaling/disable_metrics_collection.rb
fog-aws-0.5.0 lib/fog/aws/requests/auto_scaling/disable_metrics_collection.rb
fog-aws-0.4.1 lib/fog/aws/requests/auto_scaling/disable_metrics_collection.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/aws/requests/auto_scaling/disable_metrics_collection.rb
fog-aws-0.4.0 lib/fog/aws/requests/auto_scaling/disable_metrics_collection.rb
fog-aws-0.3.0 lib/fog/aws/requests/auto_scaling/disable_metrics_collection.rb
fog-aws-0.2.2 lib/fog/aws/requests/auto_scaling/disable_metrics_collection.rb
fog-aws-0.2.0 lib/fog/aws/requests/auto_scaling/disable_metrics_collection.rb
fog-aws-0.1.2 lib/fog/aws/requests/auto_scaling/disable_metrics_collection.rb
fog-aws-0.1.1 lib/fog/aws/requests/auto_scaling/disable_metrics_collection.rb
fog-aws-0.1.0 lib/fog/aws/requests/auto_scaling/disable_metrics_collection.rb
fog-aws-0.0.8 lib/fog/aws/requests/auto_scaling/disable_metrics_collection.rb