Class: Awssume::Adapter::AwsClient
- Inherits:
-
Object
- Object
- Awssume::Adapter::AwsClient
- Defined in:
- lib/awssume/adapter/aws_client.rb
Overview
This is aws sts client wrapper class
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #assume ⇒ Object
-
#initialize(config) ⇒ AwsClient
constructor
A new instance of AwsClient.
- #role_session_name ⇒ Object
Constructor Details
#initialize(config) ⇒ AwsClient
Returns a new instance of AwsClient.
9 10 11 |
# File 'lib/awssume/adapter/aws_client.rb', line 9 def initialize(config) @config = config end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
7 8 9 |
# File 'lib/awssume/adapter/aws_client.rb', line 7 def config @config end |
Instance Method Details
#assume ⇒ Object
13 14 15 |
# File 'lib/awssume/adapter/aws_client.rb', line 13 def assume sts_client.assume_role(assume_role_params).credentials.to_h end |
#role_session_name ⇒ Object
17 18 19 |
# File 'lib/awssume/adapter/aws_client.rb', line 17 def role_session_name config[:role_session_name] end |