File: terminate_job_flows.rb

package info (click to toggle)
ruby-fog-aws 3.3.0-5
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 7,816 kB
  • sloc: ruby: 68,587; makefile: 6
file content (33 lines) | stat: -rw-r--r-- 1,004 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
module Fog
  module AWS
    class EMR
      class Real
        require 'fog/aws/parsers/emr/terminate_job_flows'

        # shuts a list of job flows down.
        # http://docs.amazonwebservices.com/ElasticMapReduce/latest/API/API_TerminateJobFlows.html
        # ==== Parameters
        # * JobFlowIds <~String list> - list of strings that uniquely identify the job flows to protect
        #
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Hash>
        def terminate_job_flows(options={})
          if job_ids = options.delete('JobFlowIds')
            options.merge!(Fog::AWS.serialize_keys('JobFlowIds', job_ids))
          end
          request({
            'Action'  => 'TerminateJobFlows',
            :parser   => Fog::Parsers::AWS::EMR::TerminateJobFlows.new,
          }.merge(options))
        end
      end

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