Sha256: fdf3b9c46f52789c543399a01bc9e2a7c6c2690e453029982729607019a8b942

Contents?: true

Size: 1.28 KB

Versions: 45

Compression:

Stored size: 1.28 KB

Contents

module Fog
  module AWS
    class DataPipeline
      class Real
        # Create a pipeline
        # http://docs.aws.amazon.com/datapipeline/latest/APIReference/API_CreatePipeline.html
        # ==== Parameters
        # * UniqueId <~String> - A unique ID for of the pipeline
        # * Name <~String> - The name of the pipeline
        # * Tags <~Hash> - Key/value string pairs to categorize the pipeline
        # * Description <~String> - Description of the pipeline
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Hash>:
        def create_pipeline(unique_id, name, description=nil, tags=nil)
          params = {
            'uniqueId' => unique_id,
            'name' => name,
          }
          params['tags'] = tags.map {|k,v| {"key" => k.to_s, "value" => v.to_s}} unless tags.nil? || tags.empty?
          params['Description'] = description if description

          response = request({
            :body => Fog::JSON.encode(params),
            :headers => { 'X-Amz-Target' => 'DataPipeline.CreatePipeline' },
          })

          Fog::JSON.decode(response.body)
        end
      end

      class Mock
        def create_pipeline(unique_id, name, description=nil, tags=nil)
          Fog::Mock.not_implemented
        end
      end
    end
  end
end

Version data entries

45 entries across 45 versions & 5 rubygems

Version Path
fog-aws-0.13.0 lib/fog/aws/requests/data_pipeline/create_pipeline.rb
fog-aws-0.12.0 lib/fog/aws/requests/data_pipeline/create_pipeline.rb
fog-aws-0.11.0 lib/fog/aws/requests/data_pipeline/create_pipeline.rb
fog-aws-0.10.0 lib/fog/aws/requests/data_pipeline/create_pipeline.rb
fog-aws-0.9.4 lib/fog/aws/requests/data_pipeline/create_pipeline.rb
fog-aws-0.9.3 lib/fog/aws/requests/data_pipeline/create_pipeline.rb
fog-aws-0.9.2 lib/fog/aws/requests/data_pipeline/create_pipeline.rb
fog-aws-0.9.1 lib/fog/aws/requests/data_pipeline/create_pipeline.rb
fog-aws-0.9.0 lib/fog/aws/requests/data_pipeline/create_pipeline.rb
fog-aws-0.8.1 lib/fog/aws/requests/data_pipeline/create_pipeline.rb
fog-aws-0.8.0 lib/fog/aws/requests/data_pipeline/create_pipeline.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-aws-0.7.5/lib/fog/aws/requests/data_pipeline/create_pipeline.rb
fog-aws-0.7.6 lib/fog/aws/requests/data_pipeline/create_pipeline.rb
fog-aws-0.7.5 lib/fog/aws/requests/data_pipeline/create_pipeline.rb
fog-aws-0.7.4 lib/fog/aws/requests/data_pipeline/create_pipeline.rb
fog-aws-0.7.3 lib/fog/aws/requests/data_pipeline/create_pipeline.rb
fog-aws-0.7.2 lib/fog/aws/requests/data_pipeline/create_pipeline.rb
fog-aws-0.6.0 lib/fog/aws/requests/data_pipeline/create_pipeline.rb
fog-aws-0.5.0 lib/fog/aws/requests/data_pipeline/create_pipeline.rb
fog-aws-0.4.1 lib/fog/aws/requests/data_pipeline/create_pipeline.rb