AWS IoT Device SDK C++ v2: Aws::Crt::Auth::CredentialsProvider Class Reference

AWS IoT Device SDK C++ v2 1.14.0 AWS IoT Device SDK C++ v2

Public Member Functions | Static Public Member Functions | List of all members
Aws::Crt::Auth::CredentialsProvider Class Reference

`#include <Credentials.h>`

Inheritance diagram for Aws::Crt::Auth::CredentialsProvider:

## Public Member Functions
| CredentialsProvider (aws_credentials_provider *provider, Allocator *allocator=g_allocator) noexcept
virtual | ~CredentialsProvider ()
| CredentialsProvider (const CredentialsProvider &)=delete
| CredentialsProvider (CredentialsProvider &&)=delete
CredentialsProvider & | operator= (const CredentialsProvider &)=delete
CredentialsProvider & | operator= (CredentialsProvider &&)=delete
virtual bool | GetCredentials (const OnCredentialsResolved &onCredentialsResolved) const override
virtual aws_credentials_provider * | GetUnderlyingHandle () const noexcept override
virtual bool | IsValid () const noexcept override
Public Member Functions inherited from Aws::Crt::Auth::ICredentialsProvider
virtual | ~ICredentialsProvider ()=default

## Static Public Member Functions
static std::shared_ptr< ICredentialsProvider > | CreateCredentialsProviderStatic (const CredentialsProviderStaticConfig &config, Allocator *allocator=g_allocator)
static std::shared_ptr< ICredentialsProvider > | CreateCredentialsProviderEnvironment (Allocator *allocator=g_allocator)
static std::shared_ptr< ICredentialsProvider > | CreateCredentialsProviderProfile (const CredentialsProviderProfileConfig &config, Allocator *allocator=g_allocator)
static std::shared_ptr< ICredentialsProvider > | CreateCredentialsProviderImds (const CredentialsProviderImdsConfig &config, Allocator *allocator=g_allocator)
static std::shared_ptr< ICredentialsProvider > | CreateCredentialsProviderChain (const CredentialsProviderChainConfig &config, Allocator *allocator=g_allocator)
static std::shared_ptr< ICredentialsProvider > | CreateCredentialsProviderCached (const CredentialsProviderCachedConfig &config, Allocator *allocator=g_allocator)
static std::shared_ptr< ICredentialsProvider > | CreateCredentialsProviderChainDefault (const CredentialsProviderChainDefaultConfig &config, Allocator *allocator=g_allocator)
static std::shared_ptr< ICredentialsProvider > | CreateCredentialsProviderX509 (const CredentialsProviderX509Config &config, Allocator *allocator=g_allocator)
static std::shared_ptr< ICredentialsProvider > | CreateCredentialsProviderDelegate (const CredentialsProviderDelegateConfig &config, Allocator *allocator=g_allocator)

## Detailed Description

Simple credentials provider implementation that wraps one of the internal C-based implementations.

Contains a set of static factory methods for building each supported provider, as well as one for the default provider chain.

## Constructor & Destructor Documentation

## ◆ CredentialsProvider() [1/3]

Aws::Crt::Auth::CredentialsProvider::CredentialsProvider | ( | aws_credentials_provider * | provider,
|  | Allocator * | allocator = `g_allocator`
| ) |  |
| noexcept

## ◆ ~CredentialsProvider()

Aws::Crt::Auth::CredentialsProvider::~CredentialsProvider | ( |  | ) |
| virtual

## ◆ CredentialsProvider() [2/3]

Aws::Crt::Auth::CredentialsProvider::CredentialsProvider | ( | const CredentialsProvider & |  | ) |
| delete

## ◆ CredentialsProvider() [3/3]

Aws::Crt::Auth::CredentialsProvider::CredentialsProvider | ( | CredentialsProvider && |  | ) |
| delete

## Member Function Documentation

## ◆ CreateCredentialsProviderCached()

std::shared_ptr< ICredentialsProvider > Aws::Crt::Auth::CredentialsProvider::CreateCredentialsProviderCached | ( | const CredentialsProviderCachedConfig & | config,
|  | Allocator * | allocator = `g_allocator`
| ) |  |
| static

## ◆ CreateCredentialsProviderChain()

std::shared_ptr< ICredentialsProvider > Aws::Crt::Auth::CredentialsProvider::CreateCredentialsProviderChain | ( | const CredentialsProviderChainConfig & | config,
|  | Allocator * | allocator = `g_allocator`
| ) |  |
| static

Creates a provider that sources credentials by querying a series of providers and returning the first valid credential set encountered

## ◆ CreateCredentialsProviderChainDefault()

std::shared_ptr< ICredentialsProvider > Aws::Crt::Auth::CredentialsProvider::CreateCredentialsProviderChainDefault | ( | const CredentialsProviderChainDefaultConfig & | config,
|  | Allocator * | allocator = `g_allocator`
| ) |  |
| static

Creates the SDK-standard default credentials provider which is a cache-fronted chain of:

Environment -> Profile -> IMDS/ECS

## ◆ CreateCredentialsProviderDelegate()

std::shared_ptr< ICredentialsProvider > Aws::Crt::Auth::CredentialsProvider::CreateCredentialsProviderDelegate | ( | const CredentialsProviderDelegateConfig & | config,
|  | Allocator * | allocator = `g_allocator`
| ) |  |
| static

Creates a provider that sources credentials from the provided function.

## ◆ CreateCredentialsProviderEnvironment()

std::shared_ptr< ICredentialsProvider > Aws::Crt::Auth::CredentialsProvider::CreateCredentialsProviderEnvironment | ( | Allocator * | allocator = `g_allocator` | ) |
| static

Creates a provider that returns credentials sourced from environment variables

## ◆ CreateCredentialsProviderImds()

std::shared_ptr< ICredentialsProvider > Aws::Crt::Auth::CredentialsProvider::CreateCredentialsProviderImds | ( | const CredentialsProviderImdsConfig & | config,
|  | Allocator * | allocator = `g_allocator`
| ) |  |
| static

Creates a provider that returns credentials sourced from Ec2 instance metadata service

## ◆ CreateCredentialsProviderProfile()

std::shared_ptr< ICredentialsProvider > Aws::Crt::Auth::CredentialsProvider::CreateCredentialsProviderProfile | ( | const CredentialsProviderProfileConfig & | config,
|  | Allocator * | allocator = `g_allocator`
| ) |  |
| static

Creates a provider that returns credentials sourced from config files

## ◆ CreateCredentialsProviderStatic()

std::shared_ptr< ICredentialsProvider > Aws::Crt::Auth::CredentialsProvider::CreateCredentialsProviderStatic | ( | const CredentialsProviderStaticConfig & | config,
|  | Allocator * | allocator = `g_allocator`
| ) |  |
| static

Creates a provider that returns a fixed set of credentials

## ◆ CreateCredentialsProviderX509()

std::shared_ptr< ICredentialsProvider > Aws::Crt::Auth::CredentialsProvider::CreateCredentialsProviderX509 | ( | const CredentialsProviderX509Config & | config,
|  | Allocator * | allocator = `g_allocator`
| ) |  |
| static

Creates a provider that sources credentials from the IoT X509 provider service

## ◆ GetCredentials()

bool Aws::Crt::Auth::CredentialsProvider::GetCredentials | ( | const OnCredentialsResolved & | onCredentialsResolved | ) | const
| overridevirtual

Asynchronous method to query for AWS credentials based on the internal provider implementation.

Implements Aws::Crt::Auth::ICredentialsProvider.

## ◆ GetUnderlyingHandle()

virtual aws_credentials_provider * Aws::Crt::Auth::CredentialsProvider::GetUnderlyingHandle | ( |  | ) | const
| inlineoverridevirtualnoexcept

Returns the underlying credentials provider implementation.

Implements Aws::Crt::Auth::ICredentialsProvider.

## ◆ IsValid()

virtual bool Aws::Crt::Auth::CredentialsProvider::IsValid | ( |  | ) | const
| inlineoverridevirtualnoexcept

Validity check method

Implements Aws::Crt::Auth::ICredentialsProvider.

## ◆ operator=() [1/2]

CredentialsProvider & Aws::Crt::Auth::CredentialsProvider::operator= | ( | const CredentialsProvider & |  | ) |
| delete

## ◆ operator=() [2/2]

CredentialsProvider & Aws::Crt::Auth::CredentialsProvider::operator= | ( | CredentialsProvider && |  | ) |
| delete

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

- crt/aws-crt-cpp/include/aws/crt/auth/Credentials.h
- crt/aws-crt-cpp/source/auth/Credentials.cpp