Elasticsearch.Net.Aws.AwsHttpConnection.GetSecretKey C# (CSharp) Method

GetSecretKey() private static method

private static GetSecretKey ( AwsSettings awsSettings ) : string
awsSettings AwsSettings
return string
        private static string GetSecretKey(AwsSettings awsSettings)
        {
            var key = awsSettings.SecretKey;
            if (!string.IsNullOrWhiteSpace(key)) return key;
            #if NET45
            key = System.Configuration.ConfigurationManager.AppSettings["AWSSecretKey"];
            if (!string.IsNullOrWhiteSpace(key)) return key;
            #endif
            return Environment.GetEnvironmentVariable("AWS_SECRET_ACCESS_KEY");
        }