Class: AwsAssumeRole::Credentials::Providers::SharedKeyringCredentials
- Inherits:
-
Aws::SharedCredentials
- Object
- Aws::SharedCredentials
- AwsAssumeRole::Credentials::Providers::SharedKeyringCredentials
- Includes:
- Logging
- Defined in:
- lib/aws_assume_role/credentials/providers/shared_keyring_credentials.rb
Instance Attribute Summary collapse
-
#region ⇒ Object
readonly
Returns the value of attribute region.
-
#role_arn ⇒ Object
readonly
Returns the value of attribute role_arn.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ SharedKeyringCredentials
constructor
A new instance of SharedKeyringCredentials.
Methods included from Logging
Constructor Details
#initialize(options = {}) ⇒ SharedKeyringCredentials
Returns a new instance of SharedKeyringCredentials.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/aws_assume_role/credentials/providers/shared_keyring_credentials.rb', line 10 def initialize( = {}) logger.debug "SharedKeyringCredentials initiated with #{}" @path = [:path] @path ||= AwsAssumeRole.shared_config.credentials_path @profile_name = [:profile_name] ||= [:profile] @profile_name ||= ENV["AWS_PROFILE"] @profile_name ||= AwsAssumeRole.shared_config.profile_name logger.debug "SharedKeyringCredentials resolved profile name #{@profile_name}" config = determine_config(@path, @profile_name) @role_arn = config.profile_hash(@profile_name) @region = config.profile_region(@profile_name) @role_arn = config.profile_role(@profile_name) attempted_credential = config.credentials() return unless attempted_credential && attempted_credential.set? @credentials = attempted_credential end |
Instance Attribute Details
#region ⇒ Object (readonly)
Returns the value of attribute region.
8 9 10 |
# File 'lib/aws_assume_role/credentials/providers/shared_keyring_credentials.rb', line 8 def region @region end |
#role_arn ⇒ Object (readonly)
Returns the value of attribute role_arn.
8 9 10 |
# File 'lib/aws_assume_role/credentials/providers/shared_keyring_credentials.rb', line 8 def role_arn @role_arn end |