Пример #1
0
        public static IWebHostBuilder AddAwsSecrets(this IWebHostBuilder hostBuilder, string prefix, string region, string profile)
        {
            var chain = new Amazon.Runtime.CredentialManagement.CredentialProfileStoreChain();

            if (chain.TryGetAWSCredentials(profile, out var credentials))
            {
                return(hostBuilder.AddAwsSecrets(prefix, region, credentials));
            }
            return(hostBuilder);
        }
Пример #2
0
 public static IWebHostBuilder AddAwsSecrets(this IWebHostBuilder hostBuilder, string region)
 => hostBuilder.AddAwsSecrets(null, region, credentials: null);
Пример #3
0
 public static IWebHostBuilder AddAwsSecrets(this IWebHostBuilder hostBuilder)
 => hostBuilder.AddAwsSecrets(null, null, credentials: null);