class Amazonite::Core::IniParser

Overview

Resolves the AWS profile to use and reads credentials/region for it from ~/.aws/credentials and ~/.aws/config (or the given filepaths), matching the standard AWS CLI/SDK config file behavior.

Defined in:

core/ini_parser.cr

Constant Summary

Log = ::Log.for(self)

Constructors

Instance Method Summary

Constructor Detail

def self.new(profile : String | Nil = nil, env : Fetcher = EnvFetcher.new, credentials_filepath : String | Nil = nil, config_filepath : String | Nil = nil) #

[View source]

Instance Method Detail

def [](key) #

Looks up one of "access_key_id", "secret_access_key", or "region" for the resolved profile.


[View source]
def access_key_id #

[View source]
def config_filepath : String? #

[View source]
def credentials_filepath : String? #

[View source]
def profile : String? #

[View source]
def region #

[View source]
def role_arn : String | Nil #

[View source]
def secret_access_key #

[View source]
def session_token #

[View source]
def source_profile : String | Nil #

[View source]
def sso_account_id : String | Nil #

[View source]
def sso_region : String | Nil #

[View source]
def sso_role_name : String | Nil #

[View source]
def sso_session : String | Nil #

[View source]
def sso_session_config_value(session_name : String, key : String) : String | Nil #

looks up a key from a [sso-session <session_name>] section, distinct from the [profile <name>] sections #config_value searches


[View source]
def sso_start_url : String | Nil #

[View source]