AWS SDK for C++  1.9.21
AWS SDK for C++
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Aws::Auth::ProfileConfigFileAWSCredentialsProvider Class Reference

#include <AWSCredentialsProvider.h>

+ Inheritance diagram for Aws::Auth::ProfileConfigFileAWSCredentialsProvider:

Public Member Functions

 ProfileConfigFileAWSCredentialsProvider (long refreshRateMs=REFRESH_THRESHOLD)
 ProfileConfigFileAWSCredentialsProvider (const char *profile, long refreshRateMs=REFRESH_THRESHOLD)
AWSCredentials GetAWSCredentials () override
- Public Member Functions inherited from Aws::Auth::AWSCredentialsProvider
 AWSCredentialsProvider ()
virtual ~AWSCredentialsProvider ()=default

Static Public Member Functions

static Aws::String GetCredentialsProfileFilename ()
static Aws::String GetProfileDirectory ()

Protected Member Functions

void Reload () override
- Protected Member Functions inherited from Aws::Auth::AWSCredentialsProvider
virtual bool IsTimeToRefresh (long reloadFrequency)

Additional Inherited Members

- Protected Attributes inherited from Aws::Auth::AWSCredentialsProvider
Aws::Utils::Threading::ReaderWriterLock m_reloadLock

Detailed Description

Reads credentials profile from the default Profile Config File. Refreshes at set interval for credential rotation. Looks for environment variables AWS_SHARED_CREDENTIALS_FILE and AWS_PROFILE. If they aren't found, then it defaults to the default profile in ~/.aws/credentials. Optionally a user can specify the profile and it will override the environment variable and defaults. To alter the file this pulls from, then the user should alter the AWS_SHARED_CREDENTIALS_FILE variable.

Definition at line 148 of file AWSCredentialsProvider.h.

Constructor & Destructor Documentation

◆ ProfileConfigFileAWSCredentialsProvider() [1/2]

Aws::Auth::ProfileConfigFileAWSCredentialsProvider::ProfileConfigFileAWSCredentialsProvider ( long  refreshRateMs = REFRESH_THRESHOLD)

Initializes with refreshRateMs as the frequency at which the file is reparsed in milliseconds. Defaults to 5 minutes.

◆ ProfileConfigFileAWSCredentialsProvider() [2/2]

Aws::Auth::ProfileConfigFileAWSCredentialsProvider::ProfileConfigFileAWSCredentialsProvider ( const char *  profile,
long  refreshRateMs = REFRESH_THRESHOLD 

Initializes with a profile override and refreshRateMs as the frequency at which the file is reparsed in milliseconds. Defaults to 5 minutes.

Member Function Documentation

◆ GetAWSCredentials()

AWSCredentials Aws::Auth::ProfileConfigFileAWSCredentialsProvider::GetAWSCredentials ( )

Retrieves the credentials if found, otherwise returns empty credential set.

Implements Aws::Auth::AWSCredentialsProvider.

◆ GetCredentialsProfileFilename()

static Aws::String Aws::Auth::ProfileConfigFileAWSCredentialsProvider::GetCredentialsProfileFilename ( )

Returns the fullpath of the calculated credentials profile file

◆ GetProfileDirectory()

static Aws::String Aws::Auth::ProfileConfigFileAWSCredentialsProvider::GetProfileDirectory ( )

Returns the directory storing the profile file.

◆ Reload()

void Aws::Auth::ProfileConfigFileAWSCredentialsProvider::Reload ( )

Reimplemented from Aws::Auth::AWSCredentialsProvider.

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