Class: RubyAmazonBedrock::Configuration
- Inherits:
-
Object
- Object
- RubyAmazonBedrock::Configuration
- Defined in:
- lib/amazon_bedrock.rb
Overview
Configuration class for setting up AWS credentials and region.
Instance Attribute Summary collapse
-
#access_key_id ⇒ Object
Returns the value of attribute access_key_id.
-
#profile ⇒ Object
Returns the value of attribute profile.
-
#region ⇒ Object
Returns the value of attribute region.
-
#secret_access_key ⇒ Object
Returns the value of attribute secret_access_key.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
Initializes a new Configuration instance, loading values from environment variables or setting them to nil by default so the values can be dynamically set.
Constructor Details
#initialize ⇒ Configuration
Initializes a new Configuration instance, loading values from environment variables or setting them to nil by default so the values can be dynamically set.
21 22 23 24 25 26 |
# File 'lib/amazon_bedrock.rb', line 21 def initialize @region = ENV.fetch('AWS_REGION', nil) @access_key_id = ENV.fetch('AWS_ACCESS_KEY_ID', nil) @secret_access_key = ENV.fetch('AWS_SECRET_ACCESS_KEY', nil) @profile = ENV.fetch('AWS_PROFILE', nil) end |
Instance Attribute Details
#access_key_id ⇒ Object
Returns the value of attribute access_key_id.
16 17 18 |
# File 'lib/amazon_bedrock.rb', line 16 def access_key_id @access_key_id end |
#profile ⇒ Object
Returns the value of attribute profile.
16 17 18 |
# File 'lib/amazon_bedrock.rb', line 16 def profile @profile end |
#region ⇒ Object
Returns the value of attribute region.
16 17 18 |
# File 'lib/amazon_bedrock.rb', line 16 def region @region end |
#secret_access_key ⇒ Object
Returns the value of attribute secret_access_key.
16 17 18 |
# File 'lib/amazon_bedrock.rb', line 16 def secret_access_key @secret_access_key end |