Sha256: 36c5dcf774b8009eb61bc3b599794cac0fe85959fe2eacc02006dbd2733e0919

Contents?: true

Size: 1.77 KB

Versions: 97

Compression:

Stored size: 1.77 KB

Contents

module Fog
  module AWS
    class EMR
      class Real
        require 'fog/aws/parsers/emr/add_instance_groups'

        # adds an instance group to a running cluster
        # http://docs.amazonwebservices.com/ElasticMapReduce/latest/API/API_AddInstanceGroups.html
        # ==== Parameters
        # * JobFlowId <~String> - Job flow in which to add the instance groups
        # * InstanceGroups<~Array> - Instance Groups to add
        #   * 'BidPrice'<~String> - Bid price for each Amazon EC2 instance in the instance group when launching nodes as Spot Instances, expressed in USD.
        #   * 'InstanceCount'<~Integer> - Target number of instances for the instance group
        #   * 'InstanceRole'<~String> - MASTER | CORE | TASK The role of the instance group in the cluster
        #   * 'InstanceType'<~String> - The Amazon EC2 instance type for all instances in the instance group
        #   * 'MarketType'<~String> - ON_DEMAND | SPOT Market type of the Amazon EC2 instances used to create a cluster node
        #   * 'Name'<~String> - Friendly name given to the instance group.
        #
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Hash>:
        def add_instance_groups(job_flow_id, options={})
          if instance_groups = options.delete('InstanceGroups')
            options.merge!(Fog::AWS.indexed_param('InstanceGroups.member.%d', [*instance_groups]))
          end

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

      class Mock
        def add_instance_groups(job_flow_id, options={})
          Fog::Mock.not_implemented
        end
      end
    end
  end
end

Version data entries

97 entries across 95 versions & 6 rubygems

Version Path
fog-aws-3.29.0 lib/fog/aws/requests/emr/add_instance_groups.rb
fog-aws-3.28.0 lib/fog/aws/requests/emr/add_instance_groups.rb
fog-aws-3.27.0 lib/fog/aws/requests/emr/add_instance_groups.rb
fog-aws-3.26.0 lib/fog/aws/requests/emr/add_instance_groups.rb
fog-aws-3.25.0 lib/fog/aws/requests/emr/add_instance_groups.rb
fog-aws-3.24.0 lib/fog/aws/requests/emr/add_instance_groups.rb
fog-aws-3.23.0 lib/fog/aws/requests/emr/add_instance_groups.rb
fog-aws-3.22.0 lib/fog/aws/requests/emr/add_instance_groups.rb
fog-aws-3.21.1 lib/fog/aws/requests/emr/add_instance_groups.rb
fog-aws-3.21.0 lib/fog/aws/requests/emr/add_instance_groups.rb
fog-aws-3.20.0 lib/fog/aws/requests/emr/add_instance_groups.rb
fog-aws-3.19.0 lib/fog/aws/requests/emr/add_instance_groups.rb
fog-aws-3.18.0 lib/fog/aws/requests/emr/add_instance_groups.rb
fog-aws-3.17.0 lib/fog/aws/requests/emr/add_instance_groups.rb
fog-aws-3.16.0 lib/fog/aws/requests/emr/add_instance_groups.rb
fog-aws-3.15.0 lib/fog/aws/requests/emr/add_instance_groups.rb
fog-aws-3.14.0 lib/fog/aws/requests/emr/add_instance_groups.rb
fog-aws-3.13.0 lib/fog/aws/requests/emr/add_instance_groups.rb
fog-aws-3.12.0 lib/fog/aws/requests/emr/add_instance_groups.rb
fog-aws-3.11.0 lib/fog/aws/requests/emr/add_instance_groups.rb