Sha256: 5f8838b609fa3657616a3d56e0a8d61b39e749a19bda4d42a19336a4b241f5f8

Contents?: true

Size: 452 Bytes

Versions: 13

Compression:

Stored size: 452 Bytes

Contents

module Awspec::Type
  class IamUser < Base
    def initialize(id)
      super
      @resource_via_client = find_iam_user(id)
      @id = @resource_via_client[:user_id] if @resource_via_client
    end

    def has_iam_policy?(policy_id)
      policies = select_iam_policy_by_user_name(@resource_via_client[:user_name])
      policies.find do |policy|
        policy.policy_arn == policy_id || policy.policy_name == policy_id
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
awspec-0.33.0 lib/awspec/type/iam_user.rb
awspec-0.32.0 lib/awspec/type/iam_user.rb
awspec-0.31.0 lib/awspec/type/iam_user.rb
awspec-0.30.0 lib/awspec/type/iam_user.rb
awspec-0.29.0 lib/awspec/type/iam_user.rb
awspec-0.28.1 lib/awspec/type/iam_user.rb
awspec-0.28.0 lib/awspec/type/iam_user.rb
awspec-0.27.2 lib/awspec/type/iam_user.rb
awspec-0.27.1 lib/awspec/type/iam_user.rb
awspec-0.27.0 lib/awspec/type/iam_user.rb
awspec-0.26.2 lib/awspec/type/iam_user.rb
awspec-0.26.1 lib/awspec/type/iam_user.rb
awspec-0.26.0 lib/awspec/type/iam_user.rb