KeyVaultSettingsClient class

The KeyVaultSettingsClient provides asynchronous methods to create, update, get and list settings for the Azure Key Vault.

Constructors

KeyVaultSettingsClient(string, TokenCredential, SettingsClientOptions)

Creates an instance of the KeyVaultSettingsClient.

Example usage:

import { KeyVaultSettingsClient } from "@azure/keyvault-admin";
import { DefaultAzureCredential } from "@azure/identity";

let vaultUrl = `https://<MY KEY VAULT HERE>.vault.azure.net`;
let credentials = new DefaultAzureCredential();

let client = new KeyVaultSettingsClient(vaultUrl, credentials);

Properties

vaultUrl

The base URL to the vault.

Methods

getSetting(string, GetSettingOptions)

Get the value of a specific account setting.

getSettings(ListSettingsOptions)

List the account's settings.

updateSetting(KeyVaultSetting, UpdateSettingOptions)

Updates the named account setting.

Constructor Details

KeyVaultSettingsClient(string, TokenCredential, SettingsClientOptions)

Creates an instance of the KeyVaultSettingsClient.

Example usage:

import { KeyVaultSettingsClient } from "@azure/keyvault-admin";
import { DefaultAzureCredential } from "@azure/identity";

let vaultUrl = `https://<MY KEY VAULT HERE>.vault.azure.net`;
let credentials = new DefaultAzureCredential();

let client = new KeyVaultSettingsClient(vaultUrl, credentials);
new KeyVaultSettingsClient(vaultUrl: string, credential: TokenCredential, options?: SettingsClientOptions)

Parameters

vaultUrl

string

the URL of the Key Vault. It should have this shape: https://${your-key-vault-name}.vault.azure.net. You should validate that this URL references a valid Key Vault or Managed HSM resource. See https://aka.ms/azsdk/blog/vault-uri for details.

credential
TokenCredential

An object that implements the TokenCredential interface used to authenticate requests to the service. Use the @azure/identity package to create a credential that suits your needs.

options
SettingsClientOptions

options used to configure Key Vault API requests.

Property Details

vaultUrl

The base URL to the vault.

vaultUrl: string

Property Value

string

Method Details

getSetting(string, GetSettingOptions)

Get the value of a specific account setting.

function getSetting(settingName: string, options?: GetSettingOptions): Promise<KeyVaultSetting>

Parameters

settingName

string

the name of the setting.

options
GetSettingOptions

the optional parameters.

Returns

Promise<KeyVaultSetting>

getSettings(ListSettingsOptions)

List the account's settings.

function getSettings(options?: ListSettingsOptions): Promise<ListSettingsResponse>

Parameters

options
ListSettingsOptions

the optional parameters.

Returns

updateSetting(KeyVaultSetting, UpdateSettingOptions)

Updates the named account setting.

function updateSetting(setting: KeyVaultSetting, options?: UpdateSettingOptions): Promise<KeyVaultSetting>

Parameters

setting
KeyVaultSetting

the setting to update. The name of the setting must be a valid settings option.

options
UpdateSettingOptions

the optional parameters.

Returns

Promise<KeyVaultSetting>