You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/key-vault/secrets/quick-create-net.md
+8-5Lines changed: 8 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -167,7 +167,11 @@ In this example, the name of your key vault is expanded to the key vault URI, in
167
167
168
168
### Save a secret
169
169
170
-
Now that the console app is authenticated, add a secret to the key vault. For this task, use the [SetSecretAsync](/dotnet/api/azure.security.keyvault.secrets.secretclient.setsecretasync) method. The method's first parameter accepts a name for the secret—"mySecret" in this sample.
170
+
Now that the console app is authenticated, add a secret to the key vault. For this task, use the [SetSecretAsync](/dotnet/api/azure.security.keyvault.secrets.secretclient.setsecretasync) method.
171
+
172
+
The method's first parameter accepts a name for the secret. In this sample, the variable `secretName` stores the string "mySecret".
173
+
174
+
The method's second parameter accepts a value for the secret. In this sample, the secret is input by the user via the commandline and stored in the variable `secretValue`.
> If secret name exists, the code will create new version of that secret.
178
182
179
-
180
183
### Retrieve a secret
181
184
182
185
You can now retrieve the previously set value with the [GetSecretAsync](/dotnet/api/azure.security.keyvault.secrets.secretclient.getsecretasync) method.
@@ -189,14 +192,14 @@ Your secret is now saved as `secret.Value`.
189
192
190
193
### Delete a secret
191
194
192
-
Finally, let's delete the secret from your key vault with the [StartDeleteSecretAsync](/dotnet/api/azure.security.keyvault.secrets.secretclient.startdeletesecretasync) and [PurgeDeletedSecretAsync](/dotnet/api/azure.security.keyvault.keys.keyclient) methods.
195
+
Finally, let's delete the secret from your key vault with the [StartDeleteSecretAsync](/dotnet/api/azure.security.keyvault.secrets.secretclient.startdeletesecretasync) and [PurgeDeletedSecretAsync](/dotnet/api/azure.security.keyvault.secrets.secretclient.purgedeletedsecretasync) methods.
0 commit comments