Class: Aws::Credentials
- Inherits:
-
Object
- Object
- Aws::Credentials
- Defined in:
- gems/aws-sdk-core/lib/aws-sdk-core/credentials.rb
Instance Attribute Summary collapse
-
#access_key_id ⇒ String
readonly
-
#account_id ⇒ String?
readonly
-
#secret_access_key ⇒ String
readonly
-
#session_token ⇒ String?
readonly
Instance Method Summary collapse
-
#credentials ⇒ Credentials
-
#initialize(access_key_id, secret_access_key, session_token = nil, **kwargs) ⇒ Credentials
constructor
A new instance of Credentials.
-
#set? ⇒ Boolean
Returns
true
if the access key id and secret access key are both set.
Constructor Details
#initialize(access_key_id, secret_access_key, session_token = nil, **kwargs) ⇒ Credentials
Returns a new instance of Credentials.
11 12 13 14 15 16 17 |
# File 'gems/aws-sdk-core/lib/aws-sdk-core/credentials.rb', line 11 def initialize(access_key_id, secret_access_key, session_token = nil, **kwargs) @access_key_id = access_key_id @secret_access_key = secret_access_key @session_token = session_token @account_id = kwargs[:account_id] end |
Instance Attribute Details
#access_key_id ⇒ String (readonly)
20 21 22 |
# File 'gems/aws-sdk-core/lib/aws-sdk-core/credentials.rb', line 20 def access_key_id @access_key_id end |
#account_id ⇒ String? (readonly)
29 30 31 |
# File 'gems/aws-sdk-core/lib/aws-sdk-core/credentials.rb', line 29 def account_id @account_id end |
#secret_access_key ⇒ String (readonly)
23 24 25 |
# File 'gems/aws-sdk-core/lib/aws-sdk-core/credentials.rb', line 23 def secret_access_key @secret_access_key end |
#session_token ⇒ String? (readonly)
26 27 28 |
# File 'gems/aws-sdk-core/lib/aws-sdk-core/credentials.rb', line 26 def session_token @session_token end |
Instance Method Details
#credentials ⇒ Credentials
32 33 34 |
# File 'gems/aws-sdk-core/lib/aws-sdk-core/credentials.rb', line 32 def credentials self end |
#set? ⇒ Boolean
Returns true
if the access key id and secret
access key are both set.
38 39 40 41 42 43 |
# File 'gems/aws-sdk-core/lib/aws-sdk-core/credentials.rb', line 38 def set? !access_key_id.nil? && !access_key_id.empty? && !secret_access_key.nil? && !secret_access_key.empty? end |