module RubyAemAws::SnapshotVerifier

Mixin for checking snapshots of a component via EC2 client Add this to a component to make it capable of determining its own snapshots.

Public Instance Methods

snapshot?(snapshot_id) click to toggle source

@param snapshot_id AWS Snapshot ID @return true if snapshot exists, nil if no snapshot exists

# File lib/ruby_aem_aws/mixins/snapshot_verifier.rb, line 21
def snapshot?(snapshot_id)
  return true unless get_snapshot_by_id(snapshot_id).nil?
end
snapshots?(snapshot_type) click to toggle source

@param snapshot_type AEM snapshot type @return true if snapshots exist, false is no snapshots exist

# File lib/ruby_aem_aws/mixins/snapshot_verifier.rb, line 27
def snapshots?(snapshot_type)
  has_snapshot = false
  get_snapshots_by_type(snapshot_type).each do |s|
    next if s.nil?

    has_snapshot = true
  end
  has_snapshot
end