CARVIEW |
Select Language
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 3247
Connection: keep-alive
Date: Mon, 28 Jul 2025 07:14:32 GMT
Content-Encoding: gzip
Server: Server
Cache-Control: no-store, no-cache, must-revalidate
Expires: Thu, 01 Jan 1970 00:00:00 GMT
X-Frame-Options: SAMEORIGIN
Strict-Transport-Security: max-age=47304000; includeSubDomains
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Content-Type-Options: nosniff
Content-Security-Policy: upgrade-insecure-requests; script-src 'self' 'unsafe-inline' *.awsstatic.com *.cdn.uis.awsstatic.com *.cdn.console.awsstatic.com d2c.aws.amazon.com a0.awsstatic.com *.feedback.console.aws.dev insights.docs.aws.com wss://insights.docs.aws.com/prod; object-src 'none';
Last-Modified: Fri, 25 Jul 2025 18:50:02 GMT
ETag: "JO3aLpDrABIFxC8Dpgfzf27ZrH0=-gzip"
Accept-Ranges: bytes
Vary: Accept-Encoding
X-Cache: Miss from cloudfront
Via: 1.1 d50d717134ed031589d1b934a41d279a.cloudfront.net (CloudFront)
X-Amz-Cf-Pop: BOM78-P5
X-Amz-Cf-Id: PwGrIiHqbLOY13TRndxtxbDK2dUUaVk5LwnD-S1RwF-Jows1C53chg==
Class: Aws::SharedCredentials
— AWS SDK for Ruby V3
Class: Aws::SharedCredentials
- Inherits:
-
Object
- Object
- Aws::SharedCredentials
- Includes:
- CredentialProvider
- Defined in:
- gems/aws-sdk-core/lib/aws-sdk-core/shared_credentials.rb
Instance Attribute Summary collapse
-
#credentials ⇒ Credentials
readonly
-
#path ⇒ String
readonly
-
#profile_name ⇒ String
readonly
Attributes included from CredentialProvider
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ SharedCredentials
constructor
Constructs a new SharedCredentials object.
-
#loadable? ⇒ Boolean
deprecated
Deprecated.
This method is no longer used.
Methods included from CredentialProvider
Constructor Details
#initialize(options = {}) ⇒ SharedCredentials
Constructs a new SharedCredentials object. This will load static
(access_key_id, secret_access_key and session_token) 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.
To use credentials from the default credential resolution chain
create a client without the credential option specified.
You may access the resolved credentials through
client.config.credentials
.
Parameters:
-
[String]
(Hash)
—
a customizable set of options
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'gems/aws-sdk-core/lib/aws-sdk-core/shared_credentials.rb', line 27 def initialize(options = {}) shared_config = Aws.shared_config @path = options[:path] @path ||= shared_config.credentials_path @profile_name = options[:profile_name] @profile_name ||= ENV['AWS_PROFILE'] @profile_name ||= shared_config.profile_name if @path && @path == shared_config.credentials_path @credentials = shared_config.credentials(profile: @profile_name) else config = SharedConfig.new( credentials_path: @path, profile_name: @profile_name ) @credentials = config.credentials(profile: @profile_name) end @metrics = ['CREDENTIALS_CODE'] end |
Instance Attribute Details
#credentials ⇒ Credentials (readonly)
Returns:
53 54 55 |
# File 'gems/aws-sdk-core/lib/aws-sdk-core/shared_credentials.rb', line 53 def credentials @credentials end |
#path ⇒ String (readonly)
Returns:
- (String)
47 48 49 |
# File 'gems/aws-sdk-core/lib/aws-sdk-core/shared_credentials.rb', line 47 def path @path end |
#profile_name ⇒ String (readonly)
Returns:
- (String)
50 51 52 |
# File 'gems/aws-sdk-core/lib/aws-sdk-core/shared_credentials.rb', line 50 def profile_name @profile_name end |
Instance Method Details
#loadable? ⇒ Boolean
Returns:
-
(Boolean)
—
Returns
true
if a credential file exists and has appropriate read permissions at #path.
70 71 72 |
# File 'gems/aws-sdk-core/lib/aws-sdk-core/shared_credentials.rb', line 70 def loadable? !path.nil? && File.exist?(path) && File.readable?(path) end |
Generated on Fri Jul 25 18:50:02 2025 by
yard
0.9.37 (ruby-3.4.3).