Class: Aws::Credentials
- Inherits:
-
Object
- Object
- Aws::Credentials
- Defined in:
- lib/aws-sdk-core/credentials.rb
Direct Known Subclasses
AssumeRoleCredentials, InstanceProfileCredentials, SharedCredentials
Instance Attribute Summary collapse
- #access_key_id ⇒ String? readonly
- #secret_access_key ⇒ String? readonly
- #session_token ⇒ String? readonly
Instance Method Summary collapse
-
#initialize(access_key_id, secret_access_key, session_token = nil) ⇒ Credentials
constructor
A new instance of Credentials.
-
#inspect ⇒ Object
private
Removing the secret access key from the default inspect string.
-
#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) ⇒ Credentials
Returns a new instance of Credentials.
7 8 9 10 11 |
# File 'lib/aws-sdk-core/credentials.rb', line 7 def initialize(access_key_id, secret_access_key, session_token = nil) @access_key_id = access_key_id @secret_access_key = secret_access_key @session_token = session_token end |
Instance Attribute Details
#access_key_id ⇒ String? (readonly)
14 15 16 |
# File 'lib/aws-sdk-core/credentials.rb', line 14 def access_key_id @access_key_id end |
#secret_access_key ⇒ String? (readonly)
17 18 19 |
# File 'lib/aws-sdk-core/credentials.rb', line 17 def secret_access_key @secret_access_key end |
#session_token ⇒ String? (readonly)
20 21 22 |
# File 'lib/aws-sdk-core/credentials.rb', line 20 def session_token @session_token end |
Instance Method Details
#inspect ⇒ Object
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.
Removing the secret access key from the default inspect string.
33 34 35 |
# File 'lib/aws-sdk-core/credentials.rb', line 33 def inspect "#<#{self.class.name} access_key_id=#{access_key_id.inspect}>" end |
#set? ⇒ Boolean
Returns ‘true` if the access key id and secret access key are both set.
24 25 26 27 28 29 |
# File 'lib/aws-sdk-core/credentials.rb', line 24 def set? !access_key_id.nil? && !access_key_id.empty? && !secret_access_key.nil? && !secret_access_key.empty? end |