How do I create and dispose of SecretClient from Azure.Security.KeyVault.Secrets
? I’m migrating from KeyVaultClient
and can’t seem to find much documentation on this.
How do I create and dispose of SecretClient from Azure.Security.KeyVault.Secrets
? I’m migrating from KeyVaultClient
and can’t seem to find much documentation on this.
2
Answers
Depending on the use case of an application, a SecretClient offers both synchronous and asynchronous activities. You can interact with secrets in Azure Key Vault once a SecretClient has been initialised.
Creating secret :
StartDeleteSecret to delete a secret stored in the Azure Key Vault. When soft-delete is not enabled for the Azure Key Vault permanently disposes the secret.
For more information in detail, please refer below links:
Azure.Security.KeyVault.Secrets
Azure/azure-sdk-for-net
There is a really good article explaining how Azure SDK’s clients work – Lifetime management for Azure SDK .NET clients:
From Azure Key Vault secret client library for .NET, there are lots of samples on how to use the new clients: