Skip to content

Commit

Permalink
Fix samples that do not compile
Browse files Browse the repository at this point in the history
Addresses issues raised in #7189 and #7193 where the samples do not compile. These are not fixes, as we'll address the API issues in track 2 preview 4.
  • Loading branch information
heaths committed Aug 28, 2019
1 parent 444f949 commit f691934
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sdk/keyvault/Azure.Security.KeyVault.Secrets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ Console.WriteLine(secret.Value);
```

### Update an existing Secret
`Update` updates a secret previously stored in the Key Vault.
`Update` updates a secret previously stored in the Key Vault. Only the attributes of the secret are updated. To update the value, call `SecretClient.Set` on a `Secret` with the same name.

```c#
Secret secret = new Secret("secret-name");
Secret secret = new Secret("secret-name", "secret-value");

// Clients may specify the content type of a secret to assist in interpreting the secret data when it's retrieved
secret.ContentType = "text/plain";
Expand All @@ -156,12 +156,12 @@ Console.WriteLine(secret.Value);
```

### List secrets
This example lists all the secrets in the specified Key Vault.
This example lists all the secrets in the specified Key Vault. The value is not returned when listing all secrets. You will need to call `SecretClient.Get` to retrive the value.

```c#
IEnumerable<Response<SecretBase>> allSecrets = client.GetSecrets();

foreach (Secret secret in allSecrets)
foreach (SecretBase secret in allSecrets)
{
Console.WriteLine(secret.Name);
}
Expand Down

0 comments on commit f691934

Please sign in to comment.