Sha256: c685c0d717858691983c9ff326d9a908c89e756f8367b44513a3a87fb9d8d1ba

Contents?: true

Size: 1.26 KB

Versions: 95

Compression:

Stored size: 1.26 KB

Contents

module Fog
  module AWS
    class EMR
      class Real

        require 'fog/aws/parsers/emr/set_termination_protection'

        # locks a job flow so the Amazon EC2 instances in the cluster cannot be terminated by user intervention.
        # http://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>
        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
      end

      class Mock

        def set_termination_protection(db_name, options={})
          Fog::Mock.not_implemented
        end

      end
    end
  end
end

Version data entries

95 entries across 95 versions & 16 rubygems

Version Path
fog-1.15.0 lib/fog/aws/requests/emr/set_termination_protection.rb
gapinc-fog-1.14.0 lib/fog/aws/requests/emr/set_termination_protection.rb
fog-maestrodev-1.14.0.20130806165225 lib/fog/aws/requests/emr/set_termination_protection.rb
fog-1.14.0 lib/fog/aws/requests/emr/set_termination_protection.rb
fog-1.13.0 lib/fog/aws/requests/emr/set_termination_protection.rb
gapinc-fog-1.12.1.2 lib/fog/aws/requests/emr/set_termination_protection.rb
gapinc-fog-1.12.1.1 lib/fog/aws/requests/emr/set_termination_protection.rb
gapinc-fog-1.12.1a lib/fog/aws/requests/emr/set_termination_protection.rb
gapinc-fog-1.12.1 lib/fog/aws/requests/emr/set_termination_protection.rb
fog-1.12.1 lib/fog/aws/requests/emr/set_termination_protection.rb
fog-1.12.0 lib/fog/aws/requests/emr/set_termination_protection.rb
hpfog-0.0.20 lib/fog/aws/requests/emr/set_termination_protection.rb
vagrant-shell-0.2.6 vendor/bundle/gems/fog-1.10.1/lib/fog/aws/requests/emr/set_termination_protection.rb
vagrant-shell-0.2.5 vendor/bundle/gems/fog-1.10.1/lib/fog/aws/requests/emr/set_termination_protection.rb
fog-nirvanix-1.8.2 lib/fog/aws/requests/emr/set_termination_protection.rb
fog-1.11.1 lib/fog/aws/requests/emr/set_termination_protection.rb
fog-1.11.0 lib/fog/aws/requests/emr/set_termination_protection.rb
fog-nirvanix-1.8.1 lib/fog/aws/requests/emr/set_termination_protection.rb
fog-1.10.1 lib/fog/aws/requests/emr/set_termination_protection.rb
fog-parser-fix-1.6.1 lib/fog/aws/requests/emr/set_termination_protection.rb