You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Module: Aws::CredentialProvider

Included in:
AssumeRoleCredentials, ECSCredentials, InstanceProfileCredentials, SharedCredentials
Defined in:
gems/aws-sdk-core/lib/aws-sdk-core/credential_provider.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#credentialsCredentials (readonly)

Returns:



9
10
11
# File 'gems/aws-sdk-core/lib/aws-sdk-core/credential_provider.rb', line 9

def credentials
  @credentials
end

Instance Method Details

#access_key_idObject

Deprecated.

Deprecated in 2.1.0. This method is subject to errors from a race condition when called against refreshable credential objects. Will be removed in 2.2.0.

See Also:



20
21
22
# File 'gems/aws-sdk-core/lib/aws-sdk-core/credential_provider.rb', line 20

def access_key_id
  credentials ? credentials.access_key_id : nil
end

#secret_access_keyObject

Deprecated.

Deprecated in 2.1.0. This method is subject to errors from a race condition when called against refreshable credential objects. Will be removed in 2.2.0.

See Also:



29
30
31
# File 'gems/aws-sdk-core/lib/aws-sdk-core/credential_provider.rb', line 29

def secret_access_key
  credentials ? credentials.secret_access_key : nil
end

#session_tokenObject

Deprecated.

Deprecated in 2.1.0. This method is subject to errors from a race condition when called against refreshable credential objects. Will be removed in 2.2.0.

See Also:



38
39
40
# File 'gems/aws-sdk-core/lib/aws-sdk-core/credential_provider.rb', line 38

def session_token
  credentials ? credentials.session_token : nil
end

#set?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'gems/aws-sdk-core/lib/aws-sdk-core/credential_provider.rb', line 12

def set?
  !!credentials && credentials.set?
end