Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[KeyVault] apiVersion documentation #9656

Merged
merged 5 commits into from
Jun 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have any plans for releasing anything specific for 7.1-preview, but, yes, we should probably support it since customers will see/know it's available. I'll open separate issues across languages to at least add support.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That said, don't target a preview version in GA.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That said, don't target a preview version in GA.

For sure!


```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