Class | AWS::IAM::GroupCollection |
In: |
lib/aws/iam/group_collection.rb
|
Parent: | Object |
A collection that provides access to IAM groups belonging to this account.
iam = AWS::IAM.new groups = iam.groups
You can create a group using the {create} method:
group = iam.groups.create("Developers")
You can get a reference to a server certificate using array notation:
group = iam.groups["Developers"]
Group collections can also be used to enumerate groups:
groups.each do |group| puts group.name end
You can limit the groups returned by passing a +:prefix+ option to any of the enumerator methods. When you pass a prefix, only the certificates whose paths start with the given string will be returned.
Returns a reference to the group with the given name:
group = iam.groups['groupname']
@param [String] name Name of the group to return a reference for. @return [Group] Returns a reference to the named group.
Creates a group.
@param [String] name Name of the group to create. Do not
include the path in this value.
@param [Hash] options Options for creating the group.
@option options [String] :path The path to the group.
Yields once for each group.
You can limit the number of groups yielded using +:limit+ and +:path_prefix+.
@param [Hash] options
@option options [String] :path_prefix (’/’) A path prefix that
filters according to the path of the group.
@option options [Integer] :limit The maximum number of groups
to yield.
@option options [Integer] :batch_size The maximum number of
groups to retrieve in each service request.
@yieldparam [Group] group @return [nil]