Class: LittleGhost::Providers::Bedrock::Credentials
- Inherits:
-
Data
- Object
- Data
- LittleGhost::Providers::Bedrock::Credentials
- Defined in:
- lib/little_ghost/providers/bedrock/credential_resolver.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#access_key_id ⇒ Object
readonly
Returns the value of attribute access_key_id.
-
#expiration ⇒ Object
readonly
Returns the value of attribute expiration.
-
#secret_access_key ⇒ Object
readonly
Returns the value of attribute secret_access_key.
-
#session_token ⇒ Object
readonly
Returns the value of attribute session_token.
Instance Method Summary collapse
-
#initialize(access_key_id:, secret_access_key:, session_token: nil, expiration: nil) ⇒ Credentials
constructor
A new instance of Credentials.
Constructor Details
#initialize(access_key_id:, secret_access_key:, session_token: nil, expiration: nil) ⇒ Credentials
Returns a new instance of Credentials.
11 12 13 14 15 16 |
# File 'lib/little_ghost/providers/bedrock/credential_resolver.rb', line 11 def initialize(access_key_id:, secret_access_key:, session_token: nil, expiration: nil) raise CredentialError, "AWS access key ID and secret access key are required" if access_key_id.to_s.empty? || secret_access_key.to_s.empty? super(access_key_id: access_key_id.to_s, secret_access_key: secret_access_key.to_s, session_token: session_token&.to_s, expiration: expiration && Time.parse(expiration.to_s)) end |
Instance Attribute Details
#access_key_id ⇒ Object (readonly)
Returns the value of attribute access_key_id
10 11 12 |
# File 'lib/little_ghost/providers/bedrock/credential_resolver.rb', line 10 def access_key_id @access_key_id end |
#expiration ⇒ Object (readonly)
Returns the value of attribute expiration
10 11 12 |
# File 'lib/little_ghost/providers/bedrock/credential_resolver.rb', line 10 def expiration @expiration end |
#secret_access_key ⇒ Object (readonly)
Returns the value of attribute secret_access_key
10 11 12 |
# File 'lib/little_ghost/providers/bedrock/credential_resolver.rb', line 10 def secret_access_key @secret_access_key end |
#session_token ⇒ Object (readonly)
Returns the value of attribute session_token
10 11 12 |
# File 'lib/little_ghost/providers/bedrock/credential_resolver.rb', line 10 def session_token @session_token end |