You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.
Class: Aws::SharedCredentialsConstructs a new SharedCredentials object.
This method is no longer used.
#access_key_id, #secret_access_key, #session_token, #set?
Constructor Details #initialize(options = {}) ⇒ SharedCredentialsConstructs a new SharedCredentials object. This will load AWS access credentials from an ini file, which supports profiles. The default profile name is 'default'. You can specify the profile name with the ENV['AWS_PROFILE']
or with the :profile_name
option.
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
# File 'aws-sdk-core/lib/aws-sdk-core/shared_credentials.rb', line 24 def initialize(options = {}) = Aws. @path = options[:path] @path ||= .credentials_path @profile_name = options[:profile_name] @profile_name ||= ENV['AWS_PROFILE'] @profile_name ||= .profile_name if @path && @path == .credentials_path @credentials = .credentials(profile: @profile_name) else config = SharedConfig.new( credentials_path: @path, profile_name: @profile_name ) @credentials = config.credentials(profile: @profile_name) end endInstance Attribute Details #credentials ⇒ Credentials
49 50 51
# File 'aws-sdk-core/lib/aws-sdk-core/shared_credentials.rb', line 49 def credentials @credentials end#path ⇒ String
43 44 45
# File 'aws-sdk-core/lib/aws-sdk-core/shared_credentials.rb', line 43 def path @path end#profile_name ⇒ String
46 47 48
# File 'aws-sdk-core/lib/aws-sdk-core/shared_credentials.rb', line 46 def profile_name @profile_name endInstance Method Details #loadable? ⇒ Boolean Deprecated.
This method is no longer used.
Note:This method does not indicate if the file found at #path will be parsable, only if it can be read.
Returns true
if a credential file exists and has appropriate read permissions at #path.
66 67 68
# File 'aws-sdk-core/lib/aws-sdk-core/shared_credentials.rb', line 66 def loadable? !path.nil? && File.exist?(path) && File.readable?(path) end
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4