void Download() { Log.Debug("Downloading secret: " + SecretId + "..."); try { var secrets = AwsSecretProvider.GetProvider(SecretProviderType).Download(SecretId).RiskDeadlockAndAwaitResult(); if (secrets.IsEmpty()) { throw new Exception("AWS SecretString was empty!"); } SecretString = secrets; Log.Debug("Downloaded secrets successfully."); } catch (AggregateException ex) { Log.Error(ex.InnerException, "Failed to obtain the AWS secret: " + SecretId); throw; } catch (Exception ex) { Log.Error(ex, "Failed to obtain the AWS secret: " + SecretId); throw; } }
protected override string DownloadSecrets() => AwsSecretProvider.GetProvider(SecretProviderType).Download(SecretId).RiskDeadlockAndAwaitResult();