Skip to content

Commit

Permalink
[KeyVault] adding KeyVault intro section to all readmes (#17379)
Browse files Browse the repository at this point in the history
* updating keyvault keys readme

* secrets readme updated

* updating certificates readme

* updating imports

* removing empty assignment

* Update sdk/keyvault/azsecrets/README.md

Co-authored-by: Kim Ying <15070078+kimprice@users.noreply.github.com>

* changing function names

* adding KeyVault intro section to all readmes

* adding links to pkg.go.dev

* Update sdk/keyvault/azcertificates/README.md

Co-authored-by: Kim Ying <15070078+kimprice@users.noreply.github.com>

Co-authored-by: Kim Ying <15070078+kimprice@users.noreply.github.com>
  • Loading branch information
seankane-msft and kimprice committed Mar 28, 2022
1 parent 9f26008 commit d348005
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 37 deletions.
30 changes: 13 additions & 17 deletions sdk/keyvault/azcertificates/README.md
@@ -1,14 +1,10 @@
# Azure Key Vault Certificates client library for Go
Azure Key Vault helps solve the following problems:
- Certificate management (this library) - create, manage, and deploy public and private SSL/TLS certificates
- Cryptographic key management
([azkeys](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/keyvault/azkeys)) - create, store, and control access to the keys used to encrypt your data
- Secrets management
([azsecrets](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/keyvault/azsecrets)) -
securely store and control access to tokens, passwords, certificates, API keys,
and other secrets

[Source code][certificates_client_src] | [pkg.go.dev][pkggodev_azcerts] | [API reference documentation][reference_docs] | [Product documentation][keyvault_docs] | [Samples][certificates_samples]
* Certificate management (this library) - create, manage, and deploy public and private SSL/TLS certificates
* Cryptographic key management (([azkeys](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys))) - create, store, and control access to the keys used to encrypt your data
* Secrets management ([azsecrets](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/keyvault/azsecrets)) - securely store and control access to tokens, passwords, certificates, API keys, and other secrets

[Source code][certificates_client_src] | [Package (pkg.go.dev)][reference_docs] | [Product documentation][keyvault_docs] | [Samples][certificates_samples]

## Getting started
### Install the package
Expand Down Expand Up @@ -146,7 +142,7 @@ This section contains code snippets covering common tasks:
* [List Properties of Certificates](#list-properties-of-certificates "List Properties of Certificates")

### Create a Certificate
[BeginCreateCertificate](https://aka.ms/azsdk/go/azcertificates)
[BeginCreateCertificate](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/keyvault/azcertificates#Client.BeginCreateCertificate)
creates a certificate to be stored in the Azure Key Vault. If a certificate with the same name already exists, a new
version of the certificate is created. Before creating a certificate, a management policy for the certificate can be
created or our default policy will be used. This method returns a long running operation poller.
Expand Down Expand Up @@ -188,11 +184,11 @@ func main() {
}
```
If you would like to check the status of your certificate creation, you can call `Poll(ctx context.Context)` on the poller or
[GetCertificateOperation](https://aka.ms/azsdk/go/azcertificates)
[GetCertificateOperation](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/keyvault/azcertificates#Client.GetCertificateOperation)
with the name of the certificate.

### Retrieve a Certificate
[GetCertificate](https://aka.ms/azsdk/go/azcertificates)
[GetCertificate](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/keyvault/azcertificates#Client.GetCertificate)
retrieves the latest version of a certificate previously stored in the Key Vault.
```go
import (
Expand Down Expand Up @@ -236,7 +232,7 @@ func main_GetCertificate() {


### Update properties of an existing Certificate
[UpdateCertificateProperties](https://aka.ms/azsdk/go/azcertificates)
[UpdateCertificateProperties](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/keyvault/azcertificates#Client.UpdateCertificateProperties)
updates a certificate previously stored in the Key Vault.
```go
import (
Expand Down Expand Up @@ -288,7 +284,7 @@ func main() {
```

### Delete a Certificate
[BeginDeleteCertificate](https://aka.ms/azsdk/go/azcertificates)
[BeginDeleteCertificate](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/keyvault/azcertificates#Client.BeginDeleteCertificate)
requests Key Vault delete a certificate, returning a poller which allows you to wait for the deletion to finish.
Waiting is helpful when the vault has [soft-delete][soft_delete] enabled, and you want to purge
(permanently delete) the certificate as soon as possible. When [soft-delete][soft_delete] is disabled,
Expand Down Expand Up @@ -337,7 +333,7 @@ func main() {
```

### List Certificates
[ListCertificates](https://aka.ms/azsdk/go/azcertificates)
[ListCertificates](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/keyvault/azcertificates#Client.ListCertificates)
lists the properties of all certificates in the specified Key Vault.
```go
import (
Expand Down Expand Up @@ -453,8 +449,8 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con
[pkggodev_azcerts]: https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/keyvault/azcertificates
[certificate_client_docs]: https://aka.ms/azsdk/go/azcertificates
[rbac_guide]: https://docs.microsoft.com/azure/key-vault/general/rbac-guide
[reference_docs]: https://aka.ms/azsdk/go/azcertificates
[certificates_client_src]: https://aka.ms/azsdk/go/azcertificates
[reference_docs]: https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/keyvault/azcertificates
[certificates_client_src]: https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/keyvault/azcertificates
[certificates_samples]: https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/keyvault/azcertificates/example_test.go
[soft_delete]: https://docs.microsoft.com/azure/key-vault/general/soft-delete-overview

Expand Down
29 changes: 15 additions & 14 deletions sdk/keyvault/azkeys/README.md
@@ -1,9 +1,9 @@
# Azure Key Vault Keys client library for Go
Azure Key Vault helps solve the following problems:
- Cryptographic key management (this library) - create, store, and control
access to the keys used to encrypt your data

[Source code][key_client_src] | [Package (pkg.go.dev)][goget_azkeys] | [API reference documentation][reference_docs] | [Product documentation][keyvault_docs]
* Cryptographic key management (this library) - create, store, and control access to the keys used to encrypt your data
* Secrets management ([azsecrets](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/keyvault/azsecrets)) - securely store and control access to tokens, passwords, certificates, API keys, and other secrets
* Certificate management ([azcertificates](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/keyvault/azcertificates)) - create, manage, and deploy public and private SSL/TLS certificates
[Source code][key_client_src] | [Package (pkg.go.dev)][goget_azkeys] | [Product documentation][keyvault_docs] | [Samples][keys_samples]

## Getting started
### Install packages
Expand Down Expand Up @@ -141,8 +141,8 @@ This section contains code snippets covering common tasks:
<!-- * [Perform cryptographic operations](#cryptographic-operations) -->

### Create a key
[`CreateRSAKey`](https://aka.ms/azsdk/go/keyvault-keys) and
[`CreateECKey`](https://aka.ms/azsdk/go/keyvault-keys) create RSA and elliptic curve keys in the vault, respectively. If a key with the same name already exists, a new version of that key is created.
[`CreateRSAKey`](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys#Client.CreateRSAKey) and
[`CreateECKey`](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys#Client.CreateECKey) create RSA and elliptic curve keys in the vault, respectively. If a key with the same name already exists, a new version of that key is created.

```go
import (
Expand Down Expand Up @@ -183,7 +183,7 @@ func main() {
```

### Retrieve a key
[`GetKey`](https://aka.ms/azsdk/go/keyvault-keys) retrieves a key previously stored in the Vault.
[`GetKey`](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys#Client.GetKey) retrieves a key previously stored in the Vault.
```go
import (
"fmt"
Expand Down Expand Up @@ -213,7 +213,7 @@ func main() {
```

### Update an existing key
[`UpdateKeyProperties`](https://aka.ms/azsdk/go/keyvault-keys)
[`UpdateKeyProperties`](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys#Client.UpdateKeyProperties)
updates the properties of a key previously stored in the Key Vault.
```go
import (
Expand Down Expand Up @@ -249,7 +249,7 @@ func main() {
```

### Delete a key
[`BeginDeleteKey`](https://aka.ms/azsdk/go/keyvault-keys) requests Key Vault delete a key, returning a poller which allows you to wait for the deletion to finish. Waiting is helpful when the vault has [soft-delete][soft_delete] enabled, and you want to purge (permanently delete) the key as soon as possible. When [soft-delete][soft_delete] is disabled, `BeginDeleteKey` itself is permanent.
[`BeginDeleteKey`](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys#Client.BeginDeleteKey) requests Key Vault delete a key, returning a poller which allows you to wait for the deletion to finish. Waiting is helpful when the vault has [soft-delete][soft_delete] enabled, and you want to purge (permanently delete) the key as soon as possible. When [soft-delete][soft_delete] is disabled, `BeginDeleteKey` itself is permanent.

```go
import (
Expand Down Expand Up @@ -333,7 +333,7 @@ func main() {
```

### List keys
[`ListKeys`](https://aka.ms/azsdk/go/keyvault-keys) lists the properties of all of the keys in the client's vault.
[`ListKeys`](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys#Client.ListKeys) lists the properties of all of the keys in the client's vault.

```go
import (
Expand Down Expand Up @@ -372,7 +372,7 @@ func main() {
```

### Cryptographic operations
[CryptographyClient](https://aka.ms/azsdk/go/keyvault-keys)
[CryptographyClient](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys/crypto#Client)
enables cryptographic operations (encrypt/decrypt, wrap/unwrap, sign/verify) using a particular key.

```go
Expand Down Expand Up @@ -498,11 +498,12 @@ contact opencode@microsoft.com with any additional questions or comments.
[keyvault_docs]: https://docs.microsoft.com/azure/key-vault/
[goget_azkeys]: https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys
[rbac_guide]: https://docs.microsoft.com/azure/key-vault/general/rbac-guide
[reference_docs]: https://aka.ms/azsdk/go/keyvault-keys
[key_client_docs]: https://aka.ms/azsdk/go/keyvault-keys#Client
[crypto_client_docs]: https://aka.ms/azsdk/go/keyvault-keys/crypto/docs
[reference_docs]: https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys
[key_client_docs]: https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys#Client
[crypto_client_docs]: https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys/crypto#Client
[key_client_src]: https://github.com/Azure/azure-sdk-for-go/tree/fd86ba6a0ece5a0658dd16f8d3d564493369a8a2/sdk/keyvault/azkeys/client.go
[key_samples]: https://github.com/Azure/azure-sdk-for-go/tree/fd86ba6a0ece5a0658dd16f8d3d564493369a8a2/sdk/keyvault/azkeys/example_test.go
[soft_delete]: https://docs.microsoft.com/azure/key-vault/general/soft-delete-overview
[keys_samples]: https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/keyvault/azkeys/example_test.go

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-go%2Fsdk%2Fkeyvault%2Fazkeys%2FREADME.png)
17 changes: 11 additions & 6 deletions sdk/keyvault/azsecrets/README.md
@@ -1,7 +1,11 @@
# Azure Key Vault Secrets client library for Go
Azure Key Vault helps solve the following problems:
* Secrets management (this library) - securely store and control access to tokens, passwords, certificates, API keys, and other secrets
* Cryptographic key management ([azkeys](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys)) - create, store, and control access to the keys used to encrypt your data
* Certificate management ([azcertificates](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/keyvault/azcertificates)) - create, manage, and deploy public and private SSL/TLS certificates
Azure Key Vault helps securely store and control access to tokens, passwords, certificates, API keys, and other secrets.

[Source code][secret_client_src] | [API reference documentation][reference_docs] | [Product documentation][keyvault_docs]
[Source code][secret_client_src] | [Package (pkg.go.dev)][reference_docs] | [Product documentation][keyvault_docs] | [Samples][secrets_samples]

## Getting started

Expand Down Expand Up @@ -143,7 +147,7 @@ This section contains code snippets covering common tasks:
* [List Secrets](#list-secrets "List Secrets")

### Set a Secret
[SetSecret](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/keyvault/azsecrets@v0.1.1#Client.SetSecret) creates new secrets and changes the values of existing secrets. If no secret with the given name exists, `SetSecret` creates a new secret with that name and the given value. If the given name is in use, `SetSecret` creates a new version of that secret, with the given value.
[SetSecret](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/keyvault/azsecrets#Client.SetSecret) creates new secrets and changes the values of existing secrets. If no secret with the given name exists, `SetSecret` creates a new secret with that name and the given value. If the given name is in use, `SetSecret` creates a new version of that secret, with the given value.

```golang
import (
Expand Down Expand Up @@ -180,7 +184,7 @@ func main() {
```

### Retrieve a Secret
[GetSecret](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/keyvault/azsecrets@v0.1.1#Client.GetSecret) retrieves a secret previously stored in the Key Vault.
[GetSecret](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/keyvault/azsecrets#Client.GetSecret) retrieves a secret previously stored in the Key Vault.

```golang
import (
Expand Down Expand Up @@ -258,7 +262,7 @@ func main() {
```

### Delete a Secret
[BeginDeleteSecret](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/keyvault/azsecrets@v0.1.1#Client.BeginDeleteSecret) requests Key Vault delete a secret, returning a poller which allows you to wait for the deletion to finish. Waiting is helpful when the vault has [soft-delete][soft_delete] enabled, and you want to purge (permanently delete) the secret as soon as possible. When [soft-delete][soft_delete] is disabled, `BeginDeleteSecret` itself is permanent.
[BeginDeleteSecret](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/keyvault/azsecrets#Client.BeginDeleteSecret) requests Key Vault delete a secret, returning a poller which allows you to wait for the deletion to finish. Waiting is helpful when the vault has [soft-delete][soft_delete] enabled, and you want to purge (permanently delete) the secret as soon as possible. When [soft-delete][soft_delete] is disabled, `BeginDeleteSecret` itself is permanent.

```golang
import (
Expand Down Expand Up @@ -295,7 +299,7 @@ func main() {
```

### List secrets
[ListSecrets](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/keyvault/azsecrets@v0.1.1#Client.ListSecrets) lists the properties of all of the secrets in the client's vault. This list doesn't include the secret's values.
[ListSecrets](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/keyvault/azsecrets#Client.ListSecrets) lists the properties of all of the secrets in the client's vault. This list doesn't include the secret's values.

```golang
import (
Expand Down Expand Up @@ -405,8 +409,9 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con
[keyvault_docs]: https://docs.microsoft.com/azure/key-vault/
[rbac_guide]: https://docs.microsoft.com/azure/key-vault/general/rbac-guide
[reference_docs]: https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/keyvault/azsecrets
[secret_client_docs]: https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/keyvault/azsecrets@v0.1.1#Client
[secret_client_docs]: https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/keyvault/azsecrets#Client
[secret_client_src]: https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/keyvault/azsecrets/client.go
[soft_delete]: https://docs.microsoft.com/azure/key-vault/general/soft-delete-overview
[secrets_samples]: https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/keyvault/azsecrets/example_test.go

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-go%2Fsdk%2Fkeyvault%2Fazsecrets%2FREADME.png)

0 comments on commit d348005

Please sign in to comment.