File: modify_instance_groups.rb

package info (click to toggle)
ruby-fog-aws 3.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 8,092 kB
  • sloc: ruby: 72,795; javascript: 14; makefile: 9; sh: 4
file content (36 lines) | stat: -rw-r--r-- 1,220 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
module Fog
  module AWS
    class EMR
      class Real
        require 'fog/aws/parsers/emr/modify_instance_groups'

        # modifies the number of nodes and configuration settings of an instance group..
        # http://docs.amazonwebservices.com/ElasticMapReduce/latest/API/API_ModifyInstanceGroups.html
        # ==== Parameters
        # * InstanceGroups <~InstanceGroupModifyConfig list> - Instance groups to change
        #   * InstanceCount <~Integer> - Target size for instance group
        #   * InstanceGroupId <~String> - Unique ID of the instance group to expand or shrink
        #
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Hash>
        def modify_instance_groups(options={})
          if job_ids = options.delete('InstanceGroups')
            options.merge!(Fog::AWS.serialize_keys('InstanceGroups', job_ids))
          end

          request({
            'Action'  => 'ModifyInstanceGroups',
            :parser   => Fog::Parsers::AWS::EMR::ModifyInstanceGroups.new,
          }.merge(options))
        end
      end

      class Mock
        def modify_instance_groups(options={})
          Fog::Mock.not_implemented
        end
      end
    end
  end
end