Sha256: 13f77f11c37d962baffeb267b3c3e1a2324874f4555624bb41483d4d934f3af0

Contents?: true

Size: 452 Bytes

Versions: 13

Compression:

Stored size: 452 Bytes

Contents

module Awspec::Type
  class IamRole < Base
    def initialize(id)
      super
      @resource_via_client = find_iam_role(id)
      @id = @resource_via_client[:role_id] if @resource_via_client
    end

    def has_iam_policy?(policy_id)
      policies = select_iam_policy_by_role_name(@resource_via_client[:role_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_role.rb
awspec-0.32.0 lib/awspec/type/iam_role.rb
awspec-0.31.0 lib/awspec/type/iam_role.rb
awspec-0.30.0 lib/awspec/type/iam_role.rb
awspec-0.29.0 lib/awspec/type/iam_role.rb
awspec-0.28.1 lib/awspec/type/iam_role.rb
awspec-0.28.0 lib/awspec/type/iam_role.rb
awspec-0.27.2 lib/awspec/type/iam_role.rb
awspec-0.27.1 lib/awspec/type/iam_role.rb
awspec-0.27.0 lib/awspec/type/iam_role.rb
awspec-0.26.2 lib/awspec/type/iam_role.rb
awspec-0.26.1 lib/awspec/type/iam_role.rb
awspec-0.26.0 lib/awspec/type/iam_role.rb