Method: ElasticTranscoder::Pipeline#create_pipeline

Defined in:
lib/elastic_transcoder/pipeline.rb

#create_pipeline(name, input_bucket, output_bucket, role) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/elastic_transcoder/pipeline.rb', line 9

def create_pipeline name, input_bucket, output_bucket, role
  action = "pipelines"
  creation_params = '{"Name":"'+name+'","InputBucket":"'+input_bucket+'","OutputBucket":"'+output_bucket+'","Role":"'+role+'","Notifications":{"Progressing":"","Completed":"","Warning":"","Error":"arn:aws:sns:us-east-1:111222333444:ETS_Errors"}}'
  headers = @utilities.initialize_headers action, {:method=>"POST", :payload=>creation_params}
  url = @utilities.build_url action
  response = @utilities.execute_post url, headers, creation_params
end