class AWS::IAM::UserPolicyCollection

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.

Attributes

user[R]

@return [User] Returns the user that this collection belongs to.

Public Class Methods

new(user, options = {}) click to toggle source

@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