class Dumbwaiter::UserProfile
Attributes
opsworks[R]
opsworks_user_profile[R]
Public Class Methods
cache()
click to toggle source
# File lib/dumbwaiter/user_profile.rb, line 4 def self.cache @cache ||= {} end
find(iam_user_arn, opsworks = Aws::OpsWorks::Client.new(region: "us-east-1"))
click to toggle source
# File lib/dumbwaiter/user_profile.rb, line 8 def self.find(iam_user_arn, opsworks = Aws::OpsWorks::Client.new(region: "us-east-1")) return nil if iam_user_arn.nil? unless cache.has_key?(iam_user_arn) cache[iam_user_arn] = opsworks.describe_user_profiles(iam_user_arns: [iam_user_arn]).user_profiles.detect { |p| p.iam_user_arn == iam_user_arn } end cache[iam_user_arn] end
new(opsworks_user_profile, opsworks = Aws::OpsWorks::Client.new(region: "us-east-1"))
click to toggle source
# File lib/dumbwaiter/user_profile.rb, line 16 def initialize(opsworks_user_profile, opsworks = Aws::OpsWorks::Client.new(region: "us-east-1")) @opsworks_user_profile = opsworks_user_profile @opsworks = opsworks end
Public Instance Methods
iam_user_arn()
click to toggle source
# File lib/dumbwaiter/user_profile.rb, line 21 def iam_user_arn opsworks_user_profile.iam_user_arn end
name()
click to toggle source
# File lib/dumbwaiter/user_profile.rb, line 25 def name opsworks_user_profile.name end