AWS Encryption SDK for C v2.4
Loading...
Searching...
No Matches
Aws::Cryptosdk::KmsKeyring::ClientSupplier Class Referenceabstract

#include <kms_keyring.h>

+ Inheritance diagram for Aws::Cryptosdk::KmsKeyring::ClientSupplier:

Public Member Functions

virtual ~ClientSupplier ()
 
virtual std::shared_ptr< KMS::KMSClient > GetClient (const Aws::String &region, std::function< void()> &report_success)=0
 

Detailed Description

Provides KMS clients in multiple regions, and allows caching of clients between multiple KMS keyrings.

Definition at line 181 of file kms_keyring.h.

Constructor & Destructor Documentation

◆ ~ClientSupplier()

virtual Aws::Cryptosdk::KmsKeyring::ClientSupplier::~ClientSupplier ( )
inlinevirtual

Definition at line 183 of file kms_keyring.h.

Member Function Documentation

◆ GetClient()

virtual std::shared_ptr< KMS::KMSClient > Aws::Cryptosdk::KmsKeyring::ClientSupplier::GetClient ( const Aws::String & region,
std::function< void()> & report_success )
pure virtual

Returns a KMS client for the particular region. Returns a callable at report_success which should be called if the client is used successfully.

Implementations of GetClient may return nullptr in order to limit KMS calls to particular regions. However, if a keyring is configured with KMS keys in a particular set of regions and GetClient returns nullptr for any of those regions, encryption will always fail with AWS_CRYPTOSDK_ERR_BAD_STATE.

Implemented in Aws::Cryptosdk::KmsKeyring::CachingClientSupplier, and Aws::Cryptosdk::KmsKeyring::SingleClientSupplier.


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