AWS SDK for C++  1.8.182
AWS SDK for C++
Public Member Functions | Protected Member Functions | List of all members
Aws::Config::AWSConfigFileProfileConfigLoader Class Reference

#include <AWSProfileConfigLoader.h>

+ Inheritance diagram for Aws::Config::AWSConfigFileProfileConfigLoader:

Public Member Functions

 AWSConfigFileProfileConfigLoader (const Aws::String &fileName, bool useProfilePrefix=false)
virtual ~AWSConfigFileProfileConfigLoader ()=default
const Aws::StringGetFileName () const
void SetFileName (const Aws::String &fileName)
- Public Member Functions inherited from Aws::Config::AWSProfileConfigLoader
virtual ~AWSProfileConfigLoader ()=default
bool Load ()
bool PersistProfiles (const Aws::Map< Aws::String, Aws::Config::Profile > &profiles)
const Aws::Map< Aws::String, Aws::Config::Profile > & GetProfiles () const
const Aws::Utils::DateTimeLastLoadTime () const

Protected Member Functions

virtual bool LoadInternal () override
virtual bool PersistInternal (const Aws::Map< Aws::String, Aws::Config::Profile > &) override

Additional Inherited Members

- Public Types inherited from Aws::Config::AWSProfileConfigLoader
using ProfilesContainer = Aws::Map< Aws::String, Aws::Config::Profile >
- Protected Attributes inherited from Aws::Config::AWSProfileConfigLoader
ProfilesContainer m_profiles
Aws::Utils::DateTime m_lastLoadTime

Detailed Description

Reads configuration from a config file (e.g. $HOME/.aws/config or $HOME/.aws/credentials

Definition at line 122 of file AWSProfileConfigLoader.h.

Constructor & Destructor Documentation

◆ AWSConfigFileProfileConfigLoader()

Aws::Config::AWSConfigFileProfileConfigLoader::AWSConfigFileProfileConfigLoader ( const Aws::String fileName,
bool  useProfilePrefix = false 

fileName - file to load config from useProfilePrefix - whether or not the profiles are prefixed with "profile", credentials file is not while the config file is. Defaults to off.

◆ ~AWSConfigFileProfileConfigLoader()

virtual Aws::Config::AWSConfigFileProfileConfigLoader::~AWSConfigFileProfileConfigLoader ( )

Member Function Documentation

◆ GetFileName()

const Aws::String& Aws::Config::AWSConfigFileProfileConfigLoader::GetFileName ( ) const

File path being used for the config loader.

Definition at line 137 of file AWSProfileConfigLoader.h.

◆ LoadInternal()

virtual bool Aws::Config::AWSConfigFileProfileConfigLoader::LoadInternal ( )

Subclasses override this method to implement fetching the profiles.

Implements Aws::Config::AWSProfileConfigLoader.

◆ PersistInternal()

virtual bool Aws::Config::AWSConfigFileProfileConfigLoader::PersistInternal ( const Aws::Map< Aws::String, Aws::Config::Profile > &  )

Subclasses override this method to implement persisting the profiles. Default returns false.

Reimplemented from Aws::Config::AWSProfileConfigLoader.

◆ SetFileName()

void Aws::Config::AWSConfigFileProfileConfigLoader::SetFileName ( const Aws::String fileName)

Give loader the ability to change the file path to load config from. This can avoid creating new loader object if the file changed.

Definition at line 143 of file AWSProfileConfigLoader.h.

The documentation for this class was generated from the following file: