AWS SDK for C++

AWS SDK for C++ Version 1.11.617

Loading...
Searching...
No Matches
Public Member Functions | List of all members
Aws::Auth::AWSCredentials Class Reference

#include <AWSCredentials.h>

Public Member Functions

 
 AWSCredentials (const Aws::String &accessKeyId, const Aws::String &secretKey)
 
 AWSCredentials (const Aws::String &accessKeyId, const Aws::String &secretKey, const Aws::String &sessionToken)
 
 AWSCredentials (const Aws::String &accessKeyId, const Aws::String &secretKey, const Aws::String &sessionToken, Aws::Utils::DateTime expiration)
 
 AWSCredentials (const Aws::String &accessKeyId, const Aws::String &secretKey, const Aws::String &sessionToken, Aws::Utils::DateTime expiration, const Aws::String &accountId)
 
bool operator== (const AWSCredentials &other) const
 
bool operator!= (const AWSCredentials &other) const
 
bool IsEmpty () const
 
bool IsExpired () const
 
bool ExpiresSoon (int64_t millisecondThreshold=5000) const
 
bool IsExpiredOrEmpty () const
 
const Aws::StringGetAWSAccessKeyId () const
 
const Aws::StringGetAWSSecretKey () const
 
const Aws::StringGetSessionToken () const
 
 
const Aws::StringGetAccountId () const
 
void SetAWSAccessKeyId (const Aws::String &accessKeyId)
 
void SetAWSSecretKey (const Aws::String &secretKey)
 
void SetSessionToken (const Aws::String &sessionToken)
 
void SetAccountId (const Aws::String &accountId)
 
void SetAWSAccessKeyId (const char *accessKeyId)
 
void SetAWSSecretKey (const char *secretKey)
 
void SetSessionToken (const char *sessionToken)
 
void SetAccountId (const char *accountId)
 
 

Detailed Description

Simple data object around aws credentials

Definition at line 18 of file AWSCredentials.h.

Constructor & Destructor Documentation

◆ AWSCredentials() [1/5]

Aws::Auth::AWSCredentials::AWSCredentials ( )
inline

Initializes an empty credentials set. Empty credentials are not expired by default. Credentials expire only if an expiration date is explicitly set on them.

Definition at line 26 of file AWSCredentials.h.

◆ AWSCredentials() [2/5]

Aws::Auth::AWSCredentials::AWSCredentials ( const Aws::String accessKeyId,
const Aws::String secretKey 
)
inline

Initializes object with accessKeyId, secretKey. SessionToken defaults to empty string. Expiration date is set to "never expire".

Definition at line 35 of file AWSCredentials.h.

◆ AWSCredentials() [3/5]

Aws::Auth::AWSCredentials::AWSCredentials ( const Aws::String accessKeyId,
const Aws::String secretKey,
const Aws::String sessionToken 
)
inline

Initializes object with accessKeyId, secretKey, and sessionToken. Expiration date is set to "never expire".

Definition at line 44 of file AWSCredentials.h.

◆ AWSCredentials() [4/5]

Aws::Auth::AWSCredentials::AWSCredentials ( const Aws::String accessKeyId,
const Aws::String secretKey,
const Aws::String sessionToken,
Aws::Utils::DateTime  expiration 
)
inline

Initializes object with accessKeyId, secretKey, sessionToken and expiration date.

Definition at line 52 of file AWSCredentials.h.

◆ AWSCredentials() [5/5]

Aws::Auth::AWSCredentials::AWSCredentials ( const Aws::String accessKeyId,
const Aws::String secretKey,
const Aws::String sessionToken,
Aws::Utils::DateTime  expiration,
const Aws::String accountId 
)
inline

Initializes object with accessKeyId, secretKey, sessionToken, expiration date and account Id.

Definition at line 60 of file AWSCredentials.h.

Member Function Documentation

◆ ExpiresSoon()

bool Aws::Auth::AWSCredentials::ExpiresSoon ( int64_t  millisecondThreshold = 5000) const
inline

Checks to see if the credentials will expire in a threshold of time

Parameters
millisecondThresholdthe milliseconds of threshold we will check for expiry.
Returns
true if the credentials will expire before the threshold

Definition at line 100 of file AWSCredentials.h.

◆ GetAccountId()

const Aws::String & Aws::Auth::AWSCredentials::GetAccountId ( ) const
inline

Gets the underlying account id

Definition at line 139 of file AWSCredentials.h.

◆ GetAWSAccessKeyId()

const Aws::String & Aws::Auth::AWSCredentials::GetAWSAccessKeyId ( ) const
inline

Gets the underlying access key credential

Definition at line 107 of file AWSCredentials.h.

◆ GetAWSSecretKey()

const Aws::String & Aws::Auth::AWSCredentials::GetAWSSecretKey ( ) const
inline

Gets the underlying secret key credential

Definition at line 115 of file AWSCredentials.h.

◆ GetExpiration()

Aws::Utils::DateTime Aws::Auth::AWSCredentials::GetExpiration ( ) const
inline

Gets the expiration date of the credential

Definition at line 131 of file AWSCredentials.h.

◆ GetSessionToken()

const Aws::String & Aws::Auth::AWSCredentials::GetSessionToken ( ) const
inline

Gets the underlying session token

Definition at line 123 of file AWSCredentials.h.

◆ IsEmpty()

bool Aws::Auth::AWSCredentials::IsEmpty ( ) const
inline

If credentials haven't been initialized or been initialized to empty values. Expiration date does not affect the result of this function.

Definition at line 90 of file AWSCredentials.h.

◆ IsExpired()

bool Aws::Auth::AWSCredentials::IsExpired ( ) const
inline

Definition at line 92 of file AWSCredentials.h.

◆ IsExpiredOrEmpty()

bool Aws::Auth::AWSCredentials::IsExpiredOrEmpty ( ) const
inline

Definition at line 102 of file AWSCredentials.h.

◆ operator!=()

bool Aws::Auth::AWSCredentials::operator!= ( const AWSCredentials other) const
inline

Definition at line 81 of file AWSCredentials.h.

◆ operator==()

bool Aws::Auth::AWSCredentials::operator== ( const AWSCredentials other) const
inline

Definition at line 71 of file AWSCredentials.h.

◆ SetAccountId() [1/2]

void Aws::Auth::AWSCredentials::SetAccountId ( const Aws::String accountId)
inline

Sets the underlying account id. Copies from parameter accountId

Definition at line 171 of file AWSCredentials.h.

◆ SetAccountId() [2/2]

void Aws::Auth::AWSCredentials::SetAccountId ( const char *  accountId)
inline

Sets the underlying account id. Copies from parameter accountId

Definition at line 204 of file AWSCredentials.h.

◆ SetAWSAccessKeyId() [1/2]

void Aws::Auth::AWSCredentials::SetAWSAccessKeyId ( const Aws::String accessKeyId)
inline

Sets the underlying access key credential. Copies from parameter accessKeyId.

Definition at line 147 of file AWSCredentials.h.

◆ SetAWSAccessKeyId() [2/2]

void Aws::Auth::AWSCredentials::SetAWSAccessKeyId ( const char *  accessKeyId)
inline

Sets the underlying access key credential. Copies from parameter accessKeyId.

Definition at line 180 of file AWSCredentials.h.

◆ SetAWSSecretKey() [1/2]

void Aws::Auth::AWSCredentials::SetAWSSecretKey ( const Aws::String secretKey)
inline

Sets the underlying secret key credential. Copies from parameter secretKey

Definition at line 155 of file AWSCredentials.h.

◆ SetAWSSecretKey() [2/2]

void Aws::Auth::AWSCredentials::SetAWSSecretKey ( const char *  secretKey)
inline

Sets the underlying secret key credential. Copies from parameter secretKey

Definition at line 188 of file AWSCredentials.h.

◆ SetExpiration()

void Aws::Auth::AWSCredentials::SetExpiration ( Aws::Utils::DateTime  expiration)
inline

Sets the expiration date of the credential

Definition at line 212 of file AWSCredentials.h.

◆ SetSessionToken() [1/2]

void Aws::Auth::AWSCredentials::SetSessionToken ( const Aws::String sessionToken)
inline

Sets the underlying session token. Copies from parameter sessionToken

Definition at line 163 of file AWSCredentials.h.

◆ SetSessionToken() [2/2]

void Aws::Auth::AWSCredentials::SetSessionToken ( const char *  sessionToken)
inline

Sets the underlying secret key credential. Copies from parameter secretKey

Definition at line 196 of file AWSCredentials.h.


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