Methods

Class/Module Index [+]

Quicksearch

Fog::Compute::AWS::Snapshots

Public Class Methods

new(attributes) click to toggle source
# File lib/fog/aws/models/compute/snapshots.rb, line 15
def initialize(attributes)
  self.filters ||= { 'RestorableBy' => 'self' }
  super
end

Public Instance Methods

all(filters = filters, options = {}) click to toggle source
# File lib/fog/aws/models/compute/snapshots.rb, line 20
def all(filters = filters, options = {})
  unless filters.is_a?(Hash)
    Fog::Logger.deprecation("all with #{filters.class} param is deprecated, use all('snapshot-id' => []) instead [light_black](#{caller.first})[/]")
    filters = {'snapshot-id' => [*filters]}
  end
  self.filters = filters
  data = service.describe_snapshots(filters.merge!(options)).body
  load(data['snapshotSet'])
  if volume
    self.replace(self.select {|snapshot| snapshot.volume_id == volume.id})
  end
  self
end
get(snapshot_id) click to toggle source
# File lib/fog/aws/models/compute/snapshots.rb, line 34
def get(snapshot_id)
  if snapshot_id
    self.class.new(:service => service).all('snapshot-id' => snapshot_id).first
  end
end
new(attributes = {}) click to toggle source
# File lib/fog/aws/models/compute/snapshots.rb, line 40
def new(attributes = {})
  if volume
    super({ 'volumeId' => volume.id }.merge!(attributes))
  else
    super
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.