Class: Swa::IAM::Role

Inherits:
Resource show all
Defined in:
lib/swa/iam/role.rb

Instance Attribute Summary

Attributes inherited from Resource

#aws_resource

Instance Method Summary collapse

Methods inherited from Resource

#data, delegate, #initialize, list

Constructor Details

This class inherits a constructor from Swa::Resource

Instance Method Details

#arnObject



14
15
16
# File 'lib/swa/iam/role.rb', line 14

def arn
  role.arn
end

#idObject



10
11
12
# File 'lib/swa/iam/role.rb', line 10

def id
  role.role_id
end

#policiesObject



22
23
24
# File 'lib/swa/iam/role.rb', line 22

def policies
  RolePolicy.list(role.policies)
end

#policy(name) ⇒ Object



26
27
28
# File 'lib/swa/iam/role.rb', line 26

def policy(name)
  RolePolicy.new(role.policy(name))
end

#summaryObject



18
19
20
# File 'lib/swa/iam/role.rb', line 18

def summary
  role.name
end