A collection that provides access to the policies associated with an IAM user. 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 user.policies["ReadOnly"] = policy user.policies.has_key?("ReadOnly") # => true
All of the methods for this class are defined in the {PolicyCollection} module.
@return [User] Returns the user that this collection belongs to.
@param [User] user The user that owns this collection.
# File lib/aws/iam/user_policy_collection.rb, line 35 def initialize user, options = {} @user = user super end