Method: AwsIamUsers#fetch_from_api_paginated

Defined in:
lib/resources/aws/aws_iam_users.rb

#fetch_from_api_paginated(backend) ⇒ Object



98
99
100
101
102
103
104
105
106
107
108
# File 'lib/resources/aws/aws_iam_users.rb', line 98

def fetch_from_api_paginated(backend)
  table = []
  page_marker = nil
  loop do
    api_result = backend.list_users(marker: page_marker)
    table += api_result.users.map(&:to_h)
    page_marker = api_result.marker
    break unless api_result.is_truncated
  end
  table
end