class Comodule::Deployment::Helper::Aws::Rds::Db

Attributes

db[RW]

Public Class Methods

new(platform, db_instance_identifier) click to toggle source
# File lib/comodule/deployment/helper/aws/rds.rb, line 32
def initialize(platform, db_instance_identifier)
  self.owner = platform
  self.db = aws.rds.db_instances[db_instance_identifier]
end

Public Instance Methods

latest_automated_snapshot() click to toggle source
# File lib/comodule/deployment/helper/aws/rds.rb, line 37
def latest_automated_snapshot
  snapshot =
    db.snapshots.with_type('automated').sort do |a, b|
      b.created_at <=> a.created_at
    end

  snapshot.first.db_snapshot_identifier
end