Skip to content

Commit

Permalink
Fix exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
Genki Sugawara committed May 10, 2016
1 parent 7b02b75 commit 954962a
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions lib/miam/exporter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -255,12 +255,19 @@ def get_account_authorization_details
:policies,
]

keys.each do |key|
key_by_filter = {
'User' => :user_detail_list,
'Role' => :role_detail_list,
'Group' => :group_detail_list,
'LocalManagedPolicy' => :policies
}

key_by_filter.values.each do |key|
account_authorization_details[key] = []
end

@iam.get_account_authorization_details.each do |resp|
keys.each do |key|
Parallel.each(key_by_filter, :in_threads => @concurrency) do |filter, key|
@iam.get_account_authorization_details(:filter => [filter]).each do |resp|
account_authorization_details[key].concat(resp[key])

unless @options[:no_progress]
Expand Down

0 comments on commit 954962a

Please sign in to comment.