Class: AWS::IAM::GroupPolicyCollection

Inherits:
Object
  • Object
show all
Includes:
PolicyCollection
Defined in:
lib/aws/iam/group_policy_collection.rb

Overview

A collection that provides access to the policies associated with an IAM group. The interface mimics a hash containing string keys and values that are instances of Policy. For example:

# add or replace a policy named "ReadOnly"
policy = AWS::IAM::Policy.new do |p|
  # ...
end
group.policies["ReadOnly"] = policy
group.policies.has_key?("ReadOnly")  # => true

All of the methods for this class are defined in the PolicyCollection module.

Instance Attribute Summary collapse

Attributes included from Core::Model

#config

Instance Method Summary collapse

Methods included from PolicyCollection

#[], #[]=, #clear, #delete, #each, #has_key?, #keys, #to_h, #values, #values_at

Methods included from Core::Collection::Limitable

#each_batch

Methods included from Core::Collection

#each, #each_batch, #enum, #first, #in_groups_of, #page

Methods included from Core::Model

#client, #config_prefix, #inspect

Constructor Details

#initialize(group, opts = {}) ⇒ GroupPolicyCollection

Returns a new instance of GroupPolicyCollection.



39
40
41
42
# File 'lib/aws/iam/group_policy_collection.rb', line 39

def initialize group, opts = {}
  @group = group
  super
end

Instance Attribute Details

#groupObject (readonly)



36
37
38
# File 'lib/aws/iam/group_policy_collection.rb', line 36

def group
  @group
end