Sha256: 64568392ed5a0cce09f0bda9f987abfaeae14c5408441e5b1a67d6207e6b651d

Contents?: true

Size: 601 Bytes

Versions: 8

Compression:

Stored size: 601 Bytes

Contents

module Awspec::Helper
  module Finder
    module Rds
      def find_rds(id)
        # db_instance_identifier
        res = @rds_client.describe_db_instances({
                                                  db_instance_identifier: id
                                                })
        return res[:db_instances][0] if res[:db_instances].count == 1
      end

      def select_rds_by_vpc_id(vpc_id)
        res = @rds_client.describe_db_instances
        res[:db_instances].select do |db_instance|
          db_instance.db_subnet_group.vpc_id == vpc_id
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
awspec-0.9.0 lib/awspec/helper/finder/rds.rb
awspec-0.8.1 lib/awspec/helper/finder/rds.rb
awspec-0.8.0 lib/awspec/helper/finder/rds.rb
awspec-0.7.0 lib/awspec/helper/finder/rds.rb
awspec-0.6.4 lib/awspec/helper/finder/rds.rb
awspec-0.6.3 lib/awspec/helper/finder/rds.rb
awspec-0.6.2 lib/awspec/helper/finder/rds.rb
awspec-0.6.1 lib/awspec/helper/finder/rds.rb