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



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

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



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

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