class Fog::AWS::DataPipeline::Pipeline

Public Class Methods

new(attributes={}) click to toggle source
Calls superclass method
# File lib/fog/aws/models/data_pipeline/pipeline.rb, line 14
def initialize(attributes={})
  # Extract the 'fields' portion of a response to attributes
  if attributes.include?('fields')
    string_fields = attributes['fields'].select { |f| f.include?('stringValue') }
    field_attributes = Hash[string_fields.map { |f| [f['key'][/^@(.+)$/, 1], f['stringValue']] }]
    merge_attributes(field_attributes)
  end

  super
end

Public Instance Methods

activate() click to toggle source
# File lib/fog/aws/models/data_pipeline/pipeline.rb, line 35
def activate
  requires :id

  service.activate_pipeline(id)

  true
end
destroy() click to toggle source
# File lib/fog/aws/models/data_pipeline/pipeline.rb, line 51
def destroy
  requires :id

  service.delete_pipeline(id)

  true
end
put(objects) click to toggle source
# File lib/fog/aws/models/data_pipeline/pipeline.rb, line 43
def put(objects)
  requires :id

  service.put_pipeline_definition(id, objects)

  true
end
save() click to toggle source
# File lib/fog/aws/models/data_pipeline/pipeline.rb, line 25
def save
  requires :name
  requires :unique_id

  data = service.create_pipeline(unique_id, name, nil, tags)
  merge_attributes(data)

  true
end