Sha256: 132ec56e3591e3fb9a33351479715a3b6e612ed8ae730a40b89f8a107dcd07ae

Contents?: true

Size: 1.4 KB

Versions: 1

Compression:

Stored size: 1.4 KB

Contents

module Fog
  module AWS
    class AutoScaling

      class Real

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

        # Runs the policy you create for your Auto Scaling group in
        # put_scaling_policy.
        #
        # ==== Parameters
        # * 'PolicyName'<~String> - The name or PolicyARN of the policy you
        #   want to run.
        # * options<~Hash>:
        #   * 'AutoScalingGroupName'<~String> - The name or ARN of the Auto
        #     Scaling group.
        #   * 'HonorCooldown'<~Boolean> - Set to true if you want Auto Scaling
        #     to reject this request if the Auto Scaling group is in cooldown.
        #
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Hash>:
        #     * 'ResponseMetadata'<~Hash>:
        #       * 'RequestId'<~String> - Id of request
        #
        # ==== See Also
        # http://docs.amazonwebservices.com/AutoScaling/latest/APIReference/API_ExecutePolicy.html
        #
        def execute_policy(policy_name, options = {})
          request({
            'Action'     => 'ExecutePolicy',
            'PolicyName' => policy_name,
            :parser      => Fog::Parsers::AWS::AutoScaling::Basic.new
          }.merge!(options))
        end

      end

      class Mock

        def execute_policy(policy_name, options = {})
          Fog::Mock.not_implemented
        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/execute_policy.rb