Class: IAM::Role
- Inherits:
-
Object
- Object
- IAM::Role
- Defined in:
- lib/w-stdlib/aws.rb
Instance Attribute Summary collapse
-
#arn ⇒ Object
readonly
Returns the value of attribute arn.
-
#doc ⇒ Object
readonly
Returns the value of attribute doc.
Instance Method Summary collapse
- #can_assume?(arn) ⇒ Boolean
-
#initialize(params) ⇒ Role
constructor
A new instance of Role.
Constructor Details
#initialize(params) ⇒ Role
Returns a new instance of Role.
73 74 75 76 77 78 |
# File 'lib/w-stdlib/aws.rb', line 73 def initialize(params) @params = params @arn = params[:arn] @arn = params['Arn'] unless @arn @doc = AssumeRolePolicyDocument.from_role params end |
Instance Attribute Details
#arn ⇒ Object (readonly)
Returns the value of attribute arn.
72 73 74 |
# File 'lib/w-stdlib/aws.rb', line 72 def arn @arn end |
#doc ⇒ Object (readonly)
Returns the value of attribute doc.
72 73 74 |
# File 'lib/w-stdlib/aws.rb', line 72 def doc @doc end |
Instance Method Details
#can_assume?(arn) ⇒ Boolean
80 81 82 |
# File 'lib/w-stdlib/aws.rb', line 80 def can_assume?(arn) @doc.can_assume?(arn) end |