Class: AWS::IAM::GroupUserCollection
- Inherits:
-
Object
- Object
- AWS::IAM::GroupUserCollection
- Defined in:
- lib/aws/iam/group_user_collection.rb
Overview
Instance Attribute Summary collapse
- #group ⇒ Object readonly
Instance Method Summary collapse
-
#add(user) ⇒ nil
Adds a user to the group.
-
#clear ⇒ nil
Removes all users from this group.
-
#each(options = {}) {|user| ... } ⇒ nil
Yields once for each user in the group.
-
#remove(user) ⇒ nil
Remove a user from the group.
Instance Attribute Details
#group ⇒ Object (readonly)
31 32 33 |
# File 'lib/aws/iam/group_user_collection.rb', line 31 def group @group end |
Instance Method Details
#add(user) ⇒ nil
Adds a user to the group.
43 44 45 46 47 |
# File 'lib/aws/iam/group_user_collection.rb', line 43 def add(user) client.add_user_to_group(:group_name => group.name, :user_name => user.name) nil end |
#clear ⇒ nil
Removes all users from this group.
61 62 63 64 65 |
# File 'lib/aws/iam/group_user_collection.rb', line 61 def clear each do |user| remove(user) end end |
#each(options = {}) {|user| ... } ⇒ nil
Yields once for each user in the group.
72 73 74 |
# File 'lib/aws/iam/group_user_collection.rb', line 72 def each( = {}, &block) super(.merge(:group_name => group.name), &block) end |
#remove(user) ⇒ nil
Remove a user from the group.
53 54 55 56 57 |
# File 'lib/aws/iam/group_user_collection.rb', line 53 def remove(user) client.remove_user_from_group(:group_name => group.name, :user_name => user.name) nil end |