Closed kinman-enphase closed 11 years ago
AWS::DataPipeline.create_pipeline returns a Core::Response object. Call the data method on the response object to access the response as a hash.
dp = AWS::DataPipeline.new
pipeline_name = "pipline_test"
pipeline = dp.client.create_pipeline({
:name => pipeline_name,
:unique_id => pipeline_name
})
definition = dp.client.get_pipeline_definition(pipeline.data)
Thank you. I was misled by the return output. Documentation clearly states it's a Core::Response.
Attempting to follow the API doc for retrieving a pipeline definition results in a ValidationException.
003 > PL = AWS::DataPipeline.new AWS::DataPipeline 004 > pipeline = PL.client.create_pipeline(:name=>pipeline_name, :unique_id=>pipeline_name) {:pipeline_id=>"df-04654872H25YEAGKG08Q"} 005 > PL.client.get_pipeline_definition(pipeline) AWS::DataPipeline::Errors::ValidationException: 1 validation error detected: Value null at 'pipelineId' failed to satisfy constraint: Member must not be null from /Users/kinman/.rvm/gems/ree-1.8.7-2012.02@master/gems/aws-sdk-1.14.1/lib/aws/core/client.rb:366:in
return_or_raise' from /Users/kinman/.rvm/gems/ree-1.8.7-2012.02@master/gems/aws-sdk-1.14.1/lib/aws/core/client.rb:467:in
client_request' from (eval):3:in `get_pipeline_definition' from (irb):5