Class: Fog::AWS::IAM::Users
- Inherits:
-
Collection
- Object
- Array
- Collection
- Fog::AWS::IAM::Users
- Defined in:
- lib/fog/aws/models/iam/users.rb
Instance Attribute Summary
Attributes inherited from Collection
Instance Method Summary collapse
Methods inherited from Collection
#clear, #create, #destroy, #initialize, #inspect, #load, model, #model, #new, #reload, #table, #to_json
Methods included from Fog::Attributes::ClassMethods
#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes
Methods included from Fog::Attributes::InstanceMethods
#_dump, #attributes, #dup, #identity, #identity=, #merge_attributes, #new_record?, #requires, #requires_one
Constructor Details
This class inherits a constructor from Fog::Collection
Instance Method Details
#all(options = {}) ⇒ Object
15 16 17 18 19 20 |
# File 'lib/fog/aws/models/iam/users.rb', line 15 def all( = {}) merge_attributes() data = connection.list_users().body merge_attributes('IsTruncated' => data['IsTruncated'], 'Marker' => data['Marker']) load(data['Users']) # data is an array of attribute hashes end |
#each ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/fog/aws/models/iam/users.rb', line 31 def each if !block_given? self else subset = dup.all subset.each_user_this_page {|f| yield f} while subset.is_truncated subset = subset.all('Marker' => subset.marker, 'MaxItems' => 1000) subset.each_user_this_page {|f| yield f} end self end end |
#each_user_this_page ⇒ Object
29 |
# File 'lib/fog/aws/models/iam/users.rb', line 29 alias :each_user_this_page :each |