Module: RubyAemAws::AbstractSnapshot

Overview

Add method to scan for snapshots

Instance Method Summary collapse

Methods included from AbstractComponent

#to_s

Methods included from InstanceDescriber

#describe_instance, #describe_instances

Instance Method Details

#get_snapshot_by_id(snapshot_id) ⇒ Object

Returns Class Aws::EC2::Snapshot.

Parameters:

  • snapshot_id

    Type of snapsthot to look for

Returns:

  • Class Aws::EC2::Snapshot



24
25
26
# File 'lib/ruby_aem_aws/abstract/snapshot.rb', line 24

def get_snapshot_by_id(snapshot_id)
  ec2_resource.snapshot(snapshot_id).data
end

#get_snapshots_by_type(snapshot_type) ⇒ Object

Returns EC2 Resource snapshots collection.

Parameters:

  • snapshot_type

    Type of snapsthot to look for

Returns:

  • EC2 Resource snapshots collection



30
31
32
# File 'lib/ruby_aem_aws/abstract/snapshot.rb', line 30

def get_snapshots_by_type(snapshot_type)
  ec2_resource.snapshots(filter_for_snapshot(snapshot_type))
end