Class: RubyAmazonBedrock::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/amazon_bedrock.rb

Overview

Configuration class for setting up AWS credentials and region.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_idObject

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

#profileObject

Returns the value of attribute profile.



16
17
18
# File 'lib/amazon_bedrock.rb', line 16

def profile
  @profile
end

#regionObject

Returns the value of attribute region.



16
17
18
# File 'lib/amazon_bedrock.rb', line 16

def region
  @region
end

#secret_access_keyObject

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