Class: Aws::Sigv2::Credentials
- Inherits:
-
Object
- Object
- Aws::Sigv2::Credentials
- Defined in:
- lib/aws-sigv2/credentials.rb
Instance Attribute Summary collapse
- #access_key_id ⇒ String readonly
- #secret_access_key ⇒ String readonly
- #session_token ⇒ String? readonly
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Credentials
constructor
A new instance of Credentials.
Constructor Details
#initialize(options = {}) ⇒ Credentials
Returns a new instance of Credentials.
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/aws-sigv2/credentials.rb', line 10 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)
22 23 24 |
# File 'lib/aws-sigv2/credentials.rb', line 22 def access_key_id @access_key_id end |
#secret_access_key ⇒ String (readonly)
25 26 27 |
# File 'lib/aws-sigv2/credentials.rb', line 25 def secret_access_key @secret_access_key end |
#session_token ⇒ String? (readonly)
28 29 30 |
# File 'lib/aws-sigv2/credentials.rb', line 28 def session_token @session_token end |