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

#include <AWSCredentialsProvider.h>

+ Inheritance diagram for Aws::Auth::ProcessCredentialsProvider:

Public Member Functions

 ProcessCredentialsProvider ()
 ProcessCredentialsProvider (const Aws::String &profile)
AWSCredentials GetAWSCredentials () override
- Public Member Functions inherited from Aws::Auth::AWSCredentialsProvider
 AWSCredentialsProvider ()
virtual ~AWSCredentialsProvider ()=default

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

Process credentials provider that loads credentials by running another command (or program) configured in config file The configuration format is as following: credential_process = command_path <arguments_list> Each time the credentials needs to be refreshed, this command will be executed with configured arguments. The default profile name to look up this configuration is "default", same as normal aws credentials configuration and other configurations. The expected valid output of the command is a Json doc output to stdout: {"Version": 1, "AccessKeyId": "AccessKey123", "SecretAccessKey": "SecretKey321", "SessionToken": "Token123", "Expiration": "1970-01-01T00:00:01Z"} The Version key specifies the version of the JSON payload and must be set to 1 for now (as an integer type). If the Version key is bumped to 2, SDKs would support both versions of the returned payload. Value of Expiration field should be an valid ISO8601 formatted date string as above example. The expected error message of the command is a string to output to stderr.

Definition at line 287 of file AWSCredentialsProvider.h.

Constructor & Destructor Documentation

◆ ProcessCredentialsProvider() [1/2]

Aws::Auth::ProcessCredentialsProvider::ProcessCredentialsProvider ( )

Initializes the provider by checking default profile

◆ ProcessCredentialsProvider() [2/2]

Aws::Auth::ProcessCredentialsProvider::ProcessCredentialsProvider ( const Aws::String profile)

Initializes the provider by checking specified profile

profilewhich profile in config file to use.

Member Function Documentation

◆ GetAWSCredentials()

AWSCredentials Aws::Auth::ProcessCredentialsProvider::GetAWSCredentials ( )

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

Implements Aws::Auth::AWSCredentialsProvider.

◆ Reload()

void Aws::Auth::ProcessCredentialsProvider::Reload ( )

Reimplemented from Aws::Auth::AWSCredentialsProvider.

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