Sha256: 82050aa98d62589374e68163dd10e0a3e634614e38b2ef44ff80e0d22147259e

Contents?: true

Size: 637 Bytes

Versions: 9

Compression:

Stored size: 637 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
        db_instances = res[:db_instances].select do |db_instance|
          db_instance.db_subnet_group.vpc_id == vpc_id
        end
        db_instances
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
awspec-0.6.0 lib/awspec/helper/finder/rds.rb
awspec-0.5.0 lib/awspec/helper/finder/rds.rb
awspec-0.4.1 lib/awspec/helper/finder/rds.rb
awspec-0.4.0 lib/awspec/helper/finder/rds.rb
awspec-0.3.0 lib/awspec/helper/finder/rds.rb
awspec-0.2.3 lib/awspec/helper/finder/rds.rb
awspec-0.2.2 lib/awspec/helper/finder/rds.rb
awspec-0.2.1 lib/awspec/helper/finder/rds.rb
awspec-0.2.0 lib/awspec/helper/finder/rds.rb