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

#include <AWSCredentialsProvider.h>

+ Inheritance diagram for Aws::Auth::InstanceProfileCredentialsProvider:

Public Member Functions

 InstanceProfileCredentialsProvider (long refreshRateMs=REFRESH_THRESHOLD)
 
 InstanceProfileCredentialsProvider (const std::shared_ptr< Aws::Config::EC2InstanceProfileConfigLoader > &, long refreshRateMs=REFRESH_THRESHOLD)
 
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

Credentials provider implementation that loads credentials from the Amazon EC2 Instance Metadata Service.

Definition at line 196 of file AWSCredentialsProvider.h.

Constructor & Destructor Documentation

◆ InstanceProfileCredentialsProvider() [1/2]

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

Initializes the provider to refresh credentials form the EC2 instance metadata service every 5 minutes. Constructs an EC2MetadataClient using the default http stack (most likely what you want).

◆ InstanceProfileCredentialsProvider() [2/2]

Aws::Auth::InstanceProfileCredentialsProvider::InstanceProfileCredentialsProvider ( const std::shared_ptr< Aws::Config::EC2InstanceProfileConfigLoader > &  ,
long  refreshRateMs = REFRESH_THRESHOLD 
)

Initializes the provider to refresh credentials form the EC2 instance metadata service every 5 minutes, uses a supplied EC2MetadataClient.

Member Function Documentation

◆ GetAWSCredentials()

AWSCredentials Aws::Auth::InstanceProfileCredentialsProvider::GetAWSCredentials ( )
overridevirtual

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

Implements Aws::Auth::AWSCredentialsProvider.

◆ Reload()

void Aws::Auth::InstanceProfileCredentialsProvider::Reload ( )
overrideprotectedvirtual

Reimplemented from Aws::Auth::AWSCredentialsProvider.


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