Class: AWS::EMR::InstanceGroup

Inherits:
Core::Resource
  • Object
show all
Defined in:
lib/aws/emr/instance_group.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bid_priceString? (readonly)

Returns the current value of bid_price.

Returns:

  • (String, nil)

    the current value of bid_price



41
42
43
# File 'lib/aws/emr/instance_group.rb', line 41

def bid_price
  @bid_price
end

#created_atTime (readonly)

Returns the current value of created_at.

Returns:

  • (Time)

    the current value of created_at



41
42
43
# File 'lib/aws/emr/instance_group.rb', line 41

def created_at
  @created_at
end

#ended_atTime (readonly)

Returns the current value of ended_at.

Returns:

  • (Time)

    the current value of ended_at



41
42
43
# File 'lib/aws/emr/instance_group.rb', line 41

def ended_at
  @ended_at
end

#instance_group_idString (readonly) Also known as: id

Returns:

  • (String)


54
55
56
# File 'lib/aws/emr/instance_group.rb', line 54

def instance_group_id
  @instance_group_id
end

#instance_request_countString (readonly)

Returns the current value of instance_request_count.

Returns:

  • (String)

    the current value of instance_request_count



41
42
43
# File 'lib/aws/emr/instance_group.rb', line 41

def instance_request_count
  @instance_request_count
end

#instance_roleString (readonly)

Returns the current value of instance_role.

Returns:

  • (String)

    the current value of instance_role



41
42
43
# File 'lib/aws/emr/instance_group.rb', line 41

def instance_role
  @instance_role
end

#instance_running_countString (readonly)

Returns the current value of instance_running_count.

Returns:

  • (String)

    the current value of instance_running_count



41
42
43
# File 'lib/aws/emr/instance_group.rb', line 41

def instance_running_count
  @instance_running_count
end

#instance_typeString (readonly)

Returns the current value of instance_type.

Returns:

  • (String)

    the current value of instance_type



41
42
43
# File 'lib/aws/emr/instance_group.rb', line 41

def instance_type
  @instance_type
end

#job_flowJobFlow (readonly)

Returns:



51
52
53
# File 'lib/aws/emr/instance_group.rb', line 51

def job_flow
  @job_flow
end

#last_state_change_reasonString (readonly)

Returns the current value of last_state_change_reason.

Returns:

  • (String)

    the current value of last_state_change_reason



41
42
43
# File 'lib/aws/emr/instance_group.rb', line 41

def last_state_change_reason
  @last_state_change_reason
end

#marketString (readonly)

Returns the current value of market.

Returns:

  • (String)

    the current value of market



41
42
43
# File 'lib/aws/emr/instance_group.rb', line 41

def market
  @market
end

#ready_atTime (readonly)

Returns the current value of ready_at.

Returns:

  • (Time)

    the current value of ready_at



41
42
43
# File 'lib/aws/emr/instance_group.rb', line 41

def ready_at
  @ready_at
end

#started_atTime (readonly)

Returns the current value of started_at.

Returns:

  • (Time)

    the current value of started_at



41
42
43
# File 'lib/aws/emr/instance_group.rb', line 41

def started_at
  @started_at
end

#stateString (readonly)

Returns the current value of state.

Returns:

  • (String)

    the current value of state



41
42
43
# File 'lib/aws/emr/instance_group.rb', line 41

def state
  @state
end

Instance Method Details

#exists?Boolean

Returns true if the instance group exists.

Returns:

  • (Boolean)

    Returns true if the instance group exists.



108
109
110
# File 'lib/aws/emr/instance_group.rb', line 108

def exists?
  !!find_in_response(get_resource)
end

#modify(options = {}) ⇒ nil

Parameters:

  • options (Hash) (defaults to: {})

Options Hash (options):

  • :count (Integer)

    The new target size for the instance group.

Returns:

  • (nil)


100
101
102
103
104
105
# File 'lib/aws/emr/instance_group.rb', line 100

def modify options = {}
  options[:instance_group_id] = instance_group_id
  options[:instance_count] = options.delete(:count) if options[:count]
  client.modify_instance_groups(:instance_groups => [options])
  nil
end

#set_instance_count(count) ⇒ nil

Modifies the target size of this instance group.

Parameters:

  • count (Integer)

Returns:

  • (nil)


92
93
94
# File 'lib/aws/emr/instance_group.rb', line 92

def set_instance_count count
  modify(:instance_count => count)
end