Amazon.KinesisTap.AWS/AWSUtilities.cs
/// <summary>
/// Get AWS Credentials from parameters. If none supplied, use the FallbackCredentialsFactory.
/// </summary>
/// <param name="accessKey">Access Key</param>
/// <param name="secretKey">Secret Key</param>
/// <param name="token">Token</param>
/// <returns>AWSCredentials</returns>
Get AWS Credentials from parameters. If none supplied, use the FallbackCredentialsFactory.
Get AWS Credentials from parameters . If none supplied use the FallbackCredentialsFactory .
public static AWSCredentials GetAWSCredentials(string accessKey, string secretKey, string token)
        {
            if (string.IsNullOrWhiteSpace(accessKey))
            {
                return FallbackCredentialsFactory.GetCredentials();
            }
            else if (string.IsNullOrWhiteSpace(token))
            {
                return new BasicAWSCredentials(accessKey, secretKey);
            }
            else
            {
                return new SessionAWSCredentials(accessKey, secretKey, token);
            }
        }
public static AWSCredentials GetAWSCredentials ( string accessKey , string secretKey , string token ) { if ( string . IsNullOrWhiteSpace ( accessKey ) ) { return FallbackCredentialsFactory . GetCredentials ( ) ; } else if ( string . IsNullOrWhiteSpace ( token ) ) { return new BasicAWSCredentials ( accessKey , secretKey ) ; } else { return new SessionAWSCredentials ( accessKey , secretKey , token ) ; } }
Get AWS Credentials from parameters.
Get AWS Credentials from parameters .
None
accessKey
string
None
secretKey
string
None
token
string
None