Skip to content

Commit

Permalink
Merge pull request #450 from htnosm/pr-change-select_all_rds_db_clust…
Browse files Browse the repository at this point in the history
…er_parameters

Change select_all_rds_db_cluster_parameters
  • Loading branch information
inokappa authored Feb 14, 2019
2 parents 771207c + 1829af0 commit 131b6e1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/awspec/helper/finder/rds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,16 @@ def select_all_rds_db_parameters(parameter_group)

def select_all_rds_db_cluster_parameters(parameter_group)
parameters = {}
res = rds_client.describe_db_cluster_parameters({
db_cluster_parameter_group_name: parameter_group
})
next_marker = nil
loop do
res = rds_client.describe_db_cluster_parameters({
marker: next_marker,
db_cluster_parameter_group_name: parameter_group
})
res.parameters.each do |param|
parameters[param.parameter_name] = param.parameter_value
end
(res.respond_to?(:next_page?) && res.next_page? && res = res.next_page) || break
(res.marker.present? && next_marker = res.marker) || break
end
parameters
end
Expand Down

0 comments on commit 131b6e1

Please sign in to comment.