Class: Aws::Sigv4::Credentials Private
- Inherits:
-
Object
- Object
- Aws::Sigv4::Credentials
- Defined in:
- lib/aws-sigv4/credentials.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Users that wish to configure static credentials can use the ‘:access_key_id` and `:secret_access_key` constructor options.
Instance Attribute Summary collapse
- #access_key_id ⇒ String readonly private
- #secret_access_key ⇒ String readonly private
- #session_token ⇒ String? readonly private
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Credentials
constructor
private
A new instance of Credentials.
- #set? ⇒ Boolean private
Constructor Details
#initialize(options = {}) ⇒ Credentials
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Credentials.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/aws-sigv4/credentials.rb', line 11 def initialize( = {}) if [:access_key_id] && [:secret_access_key] @access_key_id = [:access_key_id] @secret_access_key = [:secret_access_key] @session_token = [:session_token] else msg = "expected both :access_key_id and :secret_access_key options" raise ArgumentError, msg end end |
Instance Attribute Details
#access_key_id ⇒ String (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
23 24 25 |
# File 'lib/aws-sigv4/credentials.rb', line 23 def access_key_id @access_key_id end |
#secret_access_key ⇒ String (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
26 27 28 |
# File 'lib/aws-sigv4/credentials.rb', line 26 def secret_access_key @secret_access_key end |
#session_token ⇒ String? (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
29 30 31 |
# File 'lib/aws-sigv4/credentials.rb', line 29 def session_token @session_token end |
Instance Method Details
#set? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
32 33 34 |
# File 'lib/aws-sigv4/credentials.rb', line 32 def set? !!(access_key_id && secret_access_key) end |