Exemple #1
0
        /// <summary>
        /// Creates or updates a secret
        /// </summary>
        /// <returns> The created or the updated secret </returns>
        private static SecretBundle CreateSecret(out string secretName)
        {
            secretName = inputValidator.GetSecretName();
            string secretValue = inputValidator.GetSecretValue();

            var tags = inputValidator.GetTags();

            var contentType = inputValidator.GetSecretContentType();

            var secret = keyVaultClient.SetSecretAsync(inputValidator.GetVaultAddress(), secretName, secretValue, tags, contentType, inputValidator.GetSecretAttributes()).GetAwaiter().GetResult();

            Console.Out.WriteLine("Created/Updated secret:---------------");
            PrintoutSecret(secret);

            return(secret);
        }