private static List<DBInstance> getInstanceList(AmazonRDS client) { List<DBInstance> list = new ArrayList<DBInstance>(); try { DescribeDBInstancesResult instancesResult = client.describeDBInstances(); if (instancesResult != null) { list = instancesResult.getDBInstances(); } } catch (Exception ex) { } return list; }
aws-java-sdkを読み込んで使います。