AWS SDK for Ruby
Developer Guide

Getting Information about All Amazon RDS Subnet Groups

The following example lists the name and status of all of your Amazon RDS subnet groups in the us-west-2 region.

require 'aws-sdk-rds' # v2: require 'aws-sdk' rds = Aws::RDS::Resource.new(region: 'us-west-2') rds.db_subnet_groups.each do |s| puts s.name puts ' ' + s.subnet_group_status end