Sha256: d3b6925dbf3e8e71ce01eb8ee1d753cefe7509b1cbb56371f67897f0df6a7843

Contents?: true

Size: 1.54 KB

Versions: 1

Compression:

Stored size: 1.54 KB

Contents

module Fog
  module AWS
    class AutoScaling

      class Real

        require 'rackspace-fog/aws/parsers/auto_scaling/describe_adjustment_types'

        # Returns policy adjustment types for use in the put_scaling_policy
        # action.
        #
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Hash>:
        #     * 'ResponseMetadata'<~Hash>:
        #       * 'RequestId'<~String> - Id of request
        #     * 'DescribeAdjustmentTypesResponse'<~Hash>:
        #       * 'AdjustmentTypes'<~Array>:
        #         * 'AdjustmentType'<~String> - A policy adjustment type.
        #
        # ==== See Also
        # http://docs.amazonwebservices.com/AutoScaling/latest/APIReference/API_DescribeAdjustmentTypes.html
        #
        def describe_adjustment_types()
          request({
            'Action' => 'DescribeAdjustmentTypes',
            :parser  => Fog::Parsers::AWS::AutoScaling::DescribeAdjustmentTypes.new
          })
        end

      end

      class Mock

        def describe_adjustment_types()
          results = { 'AdjustmentTypes' => [] }
          data[:adjustment_types].each do |adjustment_type|
            results['AdjustmentTypes'] << { 'AdjustmentType' => adjustment_type }
          end
          response = Excon::Response.new
          response.status = 200
          response.body = {
            'DescribeAdjustmentTypesResult' => results,
            'ResponseMetadata' => { 'RequestId' => Fog::AWS::Mock.request_id }
          }
          response
        end

      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rackspace-fog-1.4.2 lib/rackspace-fog/aws/requests/auto_scaling/describe_adjustment_types.rb