Method: AWS::EC2::SnapshotCollection#each
- Defined in:
- lib/aws/ec2/snapshot_collection.rb
#each {|Snapshot| ... } ⇒ nil
47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/aws/ec2/snapshot_collection.rb', line 47 def each(&block) opts = {} opts[:owner_ids] = @owners.map { |id| id.to_s } unless @owners.empty? opts[:restorable_by_user_ids] = @restorable_by.map { |id| id.to_s } unless @restorable_by.empty? resp = filtered_request(:describe_snapshots, opts) resp.snapshot_set.each do |v| snapshot = Snapshot.new(v.snapshot_id, :config => config) yield(snapshot) end nil end |