Method: Fog::AWS::EMR::Real#set_termination_protection

Defined in:
lib/fog/aws/requests/emr/set_termination_protection.rb

#set_termination_protection(is_protected, options = {}) ⇒ Object

locks a job flow so the Amazon EC2 instances in the cluster cannot be terminated by user intervention. docs.amazonwebservices.com/ElasticMapReduce/latest/API/API_SetTerminationProtection.html

Parameters

  • JobFlowIds <~String list> - list of strings that uniquely identify the job flows to protect

  • TerminationProtected <~Boolean> - indicates whether to protect the job flow

Returns

  • response<~Excon::Response>:

    • body<~Hash>

[View source]

17
18
19
20
21
22
23
24
25
26
27
# File 'lib/fog/aws/requests/emr/set_termination_protection.rb', line 17

def set_termination_protection(is_protected, options={})
  
  if job_ids = options.delete('JobFlowIds')
    options.merge!(Fog::AWS.serialize_keys('JobFlowIds', job_ids))
  end
  request({
    'Action'  => 'SetTerminationProtection',
    'TerminationProtected' => is_protected,
    :parser   => Fog::Parsers::AWS::EMR::SetTerminationProtection.new,
  }.merge(options))
end