SecretsManager
De Banane Atomic
Aller à la navigationAller à la recherche
Load the secrets into a dictionary
var secretsManagerConfig = new AmazonSecretsManagerConfig() { Profile = new Profile("MyProfile"), RegionEndpoint = RegionEndpoint.EUCentral1 }; var secretsManager = new AmazonSecretsManagerClient(secretsManagerConfig); var request = new GetSecretValueRequest { SecretId = "MySecretName" }; var response = await secretsManager.GetSecretValueAsync(request); var secret = JsonConvert.DeserializeObject<Dictionary<string, string>>(response.SecretString); return secret; |