Class: Fog::AWS::IAM::Users
- Inherits:
-
Collection
- Object
- Collection
- Fog::AWS::IAM::Users
- Defined in:
- lib/fog/aws/models/iam/users.rb
Instance Method Summary collapse
- #all(options = {}) ⇒ Object
- #current ⇒ Object
- #each ⇒ Object
- #each_user_this_page ⇒ Object
- #get(identity) ⇒ Object
Instance Method Details
#all(options = {}) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/fog/aws/models/iam/users.rb', line 12 def all( = {}) merge_attributes() data = service.list_users().body merge_attributes('IsTruncated' => data['IsTruncated'], 'Marker' => data['Marker']) load(data['Users']) # data is an array of attribute hashes end |
#current ⇒ Object
19 20 21 |
# File 'lib/fog/aws/models/iam/users.rb', line 19 def current new(service.get_user.body['User']) end |
#each ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/fog/aws/models/iam/users.rb', line 32 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
30 |
# File 'lib/fog/aws/models/iam/users.rb', line 30 alias_method :each_user_this_page, :each |