Skip to content
This repository has been archived by the owner on Apr 8, 2023. It is now read-only.

Commit

Permalink
[KeyVault] apiVersion documentation (Azure#9656)
Browse files Browse the repository at this point in the history
* [KeyVault-Keys] apiVersion documentation

* undid the samples changes

* Update sdk/keyvault/keyvault-keys/README.md

Co-authored-by: Ramya Rao <ramya.rao.a@outlook.com>

* Update sdk/keyvault/keyvault-keys/README.md

Co-authored-by: Ramya Rao <ramya.rao.a@outlook.com>

* other clients

Co-authored-by: Ramya Rao <ramya.rao.a@outlook.com>
  • Loading branch information
sadasant and ramya-rao-a committed Jun 27, 2020
1 parent 6c8a6cf commit 318c423
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
19 changes: 19 additions & 0 deletions sdk/keyvault/keyvault-certificates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,25 @@ const client = new CertificateClient(url, credential);
- A **Certificate backup** can be generated from any created certificate. These backups come as
binary data, and can only be used to regenerate a previously deleted certificate.
## Specifying the Azure Key Vault service API version
By default, this package uses the latest Azure Key Vault service version which is `7.1-preview`. The only other version that is supported is `7.0`. You can change the service version being used by setting the option `apiVersion` in the client constructor as shown below:
```typescript
const { DefaultAzureCredential } = require("@azure/identity");
const { CertificateClient } = require("@azure/keyvault-certificates");
const credential = new DefaultAzureCredential();
const vaultName = "<YOUR KEYVAULT NAME>";
const url = `https://${vaultName}.vault.azure.net`;
// Change the Azure Key Vault service API version being used via the `apiVersion` option
const client = new CertificateClient(url, credential, {
apiVersion: "7.0"
});
```
## Examples
The following sections provide code snippets that cover some of the common
Expand Down
19 changes: 19 additions & 0 deletions sdk/keyvault/keyvault-keys/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,25 @@ const url = `https://${vaultName}.vault.azure.net`;
const client = new KeyClient(url, credential);
```
## Specifying the Azure Key Vault service API version
By default, this package uses the latest Azure Key Vault service version which is `7.1-preview`. The only other version that is supported is `7.0`. You can change the service version being used by setting the option `apiVersion` in the client constructor as shown below:
```typescript
const { DefaultAzureCredential } = require("@azure/identity");
const { KeyClient } = require("@azure/keyvault-keys");
const credential = new DefaultAzureCredential();
const vaultName = "<YOUR KEYVAULT NAME>";
const url = `https://${vaultName}.vault.azure.net`;
// Change the Azure Key Vault service API version being used via the `apiVersion` option
const client = new KeyClient(url, credential, {
apiVersion: "7.0"
});
```
## Examples
The following sections provide code snippets that cover some of the common
Expand Down
19 changes: 19 additions & 0 deletions sdk/keyvault/keyvault-secrets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,25 @@ const url = `https://${vaultName}.vault.azure.net`;
const client = new SecretClient(url, credential);
```
## Specifying the Azure Key Vault service API version
By default, this package uses the latest Azure Key Vault service version which is `7.1-preview`. The only other version that is supported is `7.0`. You can change the service version being used by setting the option `apiVersion` in the client constructor as shown below:
```typescript
const { DefaultAzureCredential } = require("@azure/identity");
const { SecretClient } = require("@azure/keyvault-secrets");
const credential = new DefaultAzureCredential();
const vaultName = "<YOUR KEYVAULT NAME>";
const url = `https://${vaultName}.vault.azure.net`;
// Change the Azure Key Vault service API version being used via the `apiVersion` option
const client = new SecretClient(url, credential, {
apiVersion: "7.0"
});
```
## Examples
The following sections provide code snippets that cover some of the common
Expand Down

0 comments on commit 318c423

Please sign in to comment.