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
Returns ‘true` if the access key id and secret access key are both set.
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.
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/aws-sigv4/credentials.rb', line 13 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.
25 26 27 |
# File 'lib/aws-sigv4/credentials.rb', line 25 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.
28 29 30 |
# File 'lib/aws-sigv4/credentials.rb', line 28 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.
31 32 33 |
# File 'lib/aws-sigv4/credentials.rb', line 31 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.
Returns ‘true` if the access key id and secret access key are both set.
35 36 37 38 39 40 |
# File 'lib/aws-sigv4/credentials.rb', line 35 def set? !access_key_id.nil? && !access_key_id.empty? && !secret_access_key.nil? && !secret_access_key.empty? end |