Class: Fog::AWS::DataPipeline::Pipelines
- Inherits:
-
Collection
- Object
- Array
- Collection
- Fog::AWS::DataPipeline::Pipelines
- Defined in:
- lib/fog/aws/models/data_pipeline/pipelines.rb
Instance Attribute Summary
Attributes inherited from Collection
Instance Method Summary collapse
Methods inherited from Collection
#clear, #create, #destroy, #initialize, #inspect, #load, model, #model, #new, #reload, #table, #to_json
Methods included from Fog::Attributes::ClassMethods
#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes
Methods included from Core::DeprecatedConnectionAccessors
#connection, #connection=, #prepare_service_value
Methods included from Fog::Attributes::InstanceMethods
#_dump, #attributes, #dup, #identity, #identity=, #merge_attributes, #new_record?, #persisted?, #requires, #requires_one
Constructor Details
This class inherits a constructor from Fog::Collection
Instance Method Details
#all ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/fog/aws/models/data_pipeline/pipelines.rb', line 12 def all ids = [] begin result = service.list_pipelines ids << result['pipelineIdList'].map { |id| id['id'] } end while (result['hasMoreResults'] && result['marker']) load(service.describe_pipelines(ids.flatten)['pipelineDescriptionList']) end |
#get(id) ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'lib/fog/aws/models/data_pipeline/pipelines.rb', line 23 def get(id) data = service.describe_pipelines([id])['pipelineDescriptionList'].first new(data) rescue Excon::Errors::BadRequest => error data = Fog::JSON.decode(error.response.body) raise unless data['__type'] == 'PipelineDeletedException' || data['__type'] == 'PipelineNotFoundException' nil end |