diff --git a/packages/@azure/keyvault/LICENSE.txt b/packages/@azure/keyvault/LICENSE.txt
new file mode 100644
index 000000000000..b73b4a1293c3
--- /dev/null
+++ b/packages/@azure/keyvault/LICENSE.txt
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2019 Microsoft
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/packages/@azure/keyvault/README.md b/packages/@azure/keyvault/README.md
new file mode 100644
index 000000000000..94fdcc871711
--- /dev/null
+++ b/packages/@azure/keyvault/README.md
@@ -0,0 +1,102 @@
+## Azure KeyVaultClient SDK for JavaScript
+
+This package contains an isomorphic SDK for KeyVaultClient.
+
+### Currently supported environments
+
+- Node.js version 6.x.x or higher
+- Browser JavaScript
+
+### How to Install
+
+```bash
+npm install @azure/keyvault
+```
+
+### How to use
+
+#### nodejs - Authentication, client creation and getKey as an example written in TypeScript.
+
+##### Install @azure/ms-rest-nodeauth
+
+```bash
+npm install @azure/ms-rest-nodeauth
+```
+
+##### Sample code
+
+```typescript
+import * as msRest from "@azure/ms-rest-js";
+import * as msRestAzure from "@azure/ms-rest-azure-js";
+import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";
+import { KeyVaultClient, KeyVaultModels, KeyVaultMappers } from "@azure/keyvault";
+const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
+
+msRestNodeAuth.interactiveLogin().then((creds) => {
+ const client = new KeyVaultClient(creds, subscriptionId);
+ const vaultBaseUrl = "testvaultBaseUrl";
+ const keyName = "testkeyName";
+ const keyVersion = "testkeyVersion";
+ client.getKey(vaultBaseUrl, keyName, keyVersion).then((result) => {
+ console.log("The result is:");
+ console.log(result);
+ });
+}).catch((err) => {
+ console.error(err);
+});
+```
+
+#### browser - Authentication, client creation and getKey as an example written in JavaScript.
+
+##### Install @azure/ms-rest-browserauth
+
+```bash
+npm install @azure/ms-rest-browserauth
+```
+
+##### Sample code
+
+See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser.
+
+- index.html
+```html
+
+
+
+ @azure/keyvault sample
+
+
+
+
+
+
+
+
+```
+
+## Related projects
+
+- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
diff --git a/packages/@azure/keyvault/lib/keyVaultClient.ts b/packages/@azure/keyvault/lib/keyVaultClient.ts
new file mode 100644
index 000000000000..d417726f55f0
--- /dev/null
+++ b/packages/@azure/keyvault/lib/keyVaultClient.ts
@@ -0,0 +1,6002 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+import * as msRest from "@azure/ms-rest-js";
+import * as msRestAzure from "@azure/ms-rest-azure-js";
+import * as Models from "./models";
+import * as Mappers from "./models/mappers";
+import * as Parameters from "./models/parameters";
+import { KeyVaultClientContext } from "./keyVaultClientContext";
+
+
+class KeyVaultClient extends KeyVaultClientContext {
+ /**
+ * Initializes a new instance of the KeyVaultClient class.
+ * @param credentials Credentials needed for the client to connect to Azure.
+ * @param [options] The parameter options
+ */
+ constructor(credentials: msRest.ServiceClientCredentials, options?: msRestAzure.AzureServiceClientOptions) {
+ super(credentials, options);
+ }
+
+ /**
+ * The create key operation can be used to create any key type in Azure Key Vault. If the named key
+ * already exists, Azure Key Vault creates a new version of the key. It requires the keys/create
+ * permission.
+ * @summary Creates a new key, stores it, then returns key parameters and attributes to the client.
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name for the new key. The system will generate the version name for the new
+ * key.
+ * @param kty The type of key to create. For valid values, see JsonWebKeyType. Possible values
+ * include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct'
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ createKey(vaultBaseUrl: string, keyName: string, kty: Models.JsonWebKeyType, options?: Models.KeyVaultClientCreateKeyOptionalParams): Promise;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name for the new key. The system will generate the version name for the new
+ * key.
+ * @param kty The type of key to create. For valid values, see JsonWebKeyType. Possible values
+ * include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct'
+ * @param callback The callback
+ */
+ createKey(vaultBaseUrl: string, keyName: string, kty: Models.JsonWebKeyType, callback: msRest.ServiceCallback): void;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name for the new key. The system will generate the version name for the new
+ * key.
+ * @param kty The type of key to create. For valid values, see JsonWebKeyType. Possible values
+ * include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct'
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ createKey(vaultBaseUrl: string, keyName: string, kty: Models.JsonWebKeyType, options: Models.KeyVaultClientCreateKeyOptionalParams, callback: msRest.ServiceCallback): void;
+ createKey(vaultBaseUrl: string, keyName: string, kty: Models.JsonWebKeyType, options?: Models.KeyVaultClientCreateKeyOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ vaultBaseUrl,
+ keyName,
+ kty,
+ options
+ },
+ createKeyOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * The import key operation may be used to import any key type into an Azure Key Vault. If the
+ * named key already exists, Azure Key Vault creates a new version of the key. This operation
+ * requires the keys/import permission.
+ * @summary Imports an externally created key, stores it, and returns key parameters and attributes
+ * to the client.
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName Name for the imported key.
+ * @param key The Json web key
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ importKey(vaultBaseUrl: string, keyName: string, key: Models.JsonWebKey, options?: Models.KeyVaultClientImportKeyOptionalParams): Promise;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName Name for the imported key.
+ * @param key The Json web key
+ * @param callback The callback
+ */
+ importKey(vaultBaseUrl: string, keyName: string, key: Models.JsonWebKey, callback: msRest.ServiceCallback): void;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName Name for the imported key.
+ * @param key The Json web key
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ importKey(vaultBaseUrl: string, keyName: string, key: Models.JsonWebKey, options: Models.KeyVaultClientImportKeyOptionalParams, callback: msRest.ServiceCallback): void;
+ importKey(vaultBaseUrl: string, keyName: string, key: Models.JsonWebKey, options?: Models.KeyVaultClientImportKeyOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ vaultBaseUrl,
+ keyName,
+ key,
+ options
+ },
+ importKeyOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * The delete key operation cannot be used to remove individual versions of a key. This operation
+ * removes the cryptographic material associated with the key, which means the key is not usable
+ * for Sign/Verify, Wrap/Unwrap or Encrypt/Decrypt operations. This operation requires the
+ * keys/delete permission.
+ * @summary Deletes a key of any type from storage in Azure Key Vault.
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the key to delete.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ deleteKey(vaultBaseUrl: string, keyName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the key to delete.
+ * @param callback The callback
+ */
+ deleteKey(vaultBaseUrl: string, keyName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the key to delete.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ deleteKey(vaultBaseUrl: string, keyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ deleteKey(vaultBaseUrl: string, keyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ vaultBaseUrl,
+ keyName,
+ options
+ },
+ deleteKeyOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * In order to perform this operation, the key must already exist in the Key Vault. Note: The
+ * cryptographic material of a key itself cannot be changed. This operation requires the
+ * keys/update permission.
+ * @summary The update key operation changes specified attributes of a stored key and can be
+ * applied to any key type and key version stored in Azure Key Vault.
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of key to update.
+ * @param keyVersion The version of the key to update.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ updateKey(vaultBaseUrl: string, keyName: string, keyVersion: string, options?: Models.KeyVaultClientUpdateKeyOptionalParams): Promise;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of key to update.
+ * @param keyVersion The version of the key to update.
+ * @param callback The callback
+ */
+ updateKey(vaultBaseUrl: string, keyName: string, keyVersion: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of key to update.
+ * @param keyVersion The version of the key to update.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ updateKey(vaultBaseUrl: string, keyName: string, keyVersion: string, options: Models.KeyVaultClientUpdateKeyOptionalParams, callback: msRest.ServiceCallback): void;
+ updateKey(vaultBaseUrl: string, keyName: string, keyVersion: string, options?: Models.KeyVaultClientUpdateKeyOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ vaultBaseUrl,
+ keyName,
+ keyVersion,
+ options
+ },
+ updateKeyOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * The get key operation is applicable to all key types. If the requested key is symmetric, then no
+ * key material is released in the response. This operation requires the keys/get permission.
+ * @summary Gets the public part of a stored key.
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the key to get.
+ * @param keyVersion Adding the version parameter retrieves a specific version of a key.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ getKey(vaultBaseUrl: string, keyName: string, keyVersion: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the key to get.
+ * @param keyVersion Adding the version parameter retrieves a specific version of a key.
+ * @param callback The callback
+ */
+ getKey(vaultBaseUrl: string, keyName: string, keyVersion: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the key to get.
+ * @param keyVersion Adding the version parameter retrieves a specific version of a key.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ getKey(vaultBaseUrl: string, keyName: string, keyVersion: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ getKey(vaultBaseUrl: string, keyName: string, keyVersion: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ vaultBaseUrl,
+ keyName,
+ keyVersion,
+ options
+ },
+ getKeyOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * The full key identifier, attributes, and tags are provided in the response. This operation
+ * requires the keys/list permission.
+ * @summary Retrieves a list of individual key versions with the same key name.
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the key.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ getKeyVersions(vaultBaseUrl: string, keyName: string, options?: Models.KeyVaultClientGetKeyVersionsOptionalParams): Promise;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the key.
+ * @param callback The callback
+ */
+ getKeyVersions(vaultBaseUrl: string, keyName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the key.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ getKeyVersions(vaultBaseUrl: string, keyName: string, options: Models.KeyVaultClientGetKeyVersionsOptionalParams, callback: msRest.ServiceCallback): void;
+ getKeyVersions(vaultBaseUrl: string, keyName: string, options?: Models.KeyVaultClientGetKeyVersionsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ vaultBaseUrl,
+ keyName,
+ options
+ },
+ getKeyVersionsOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Retrieves a list of the keys in the Key Vault as JSON Web Key structures that contain the public
+ * part of a stored key. The LIST operation is applicable to all key types, however only the base
+ * key identifier, attributes, and tags are provided in the response. Individual versions of a key
+ * are not listed in the response. This operation requires the keys/list permission.
+ * @summary List keys in the specified vault.
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ getKeys(vaultBaseUrl: string, options?: Models.KeyVaultClientGetKeysOptionalParams): Promise;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param callback The callback
+ */
+ getKeys(vaultBaseUrl: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ getKeys(vaultBaseUrl: string, options: Models.KeyVaultClientGetKeysOptionalParams, callback: msRest.ServiceCallback): void;
+ getKeys(vaultBaseUrl: string, options?: Models.KeyVaultClientGetKeysOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ vaultBaseUrl,
+ options
+ },
+ getKeysOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * The Key Backup operation exports a key from Azure Key Vault in a protected form. Note that this
+ * operation does NOT return key material in a form that can be used outside the Azure Key Vault
+ * system, the returned key material is either protected to a Azure Key Vault HSM or to Azure Key
+ * Vault itself. The intent of this operation is to allow a client to GENERATE a key in one Azure
+ * Key Vault instance, BACKUP the key, and then RESTORE it into another Azure Key Vault instance.
+ * The BACKUP operation may be used to export, in protected form, any key type from Azure Key
+ * Vault. Individual versions of a key cannot be backed up. BACKUP / RESTORE can be performed
+ * within geographical boundaries only; meaning that a BACKUP from one geographical area cannot be
+ * restored to another geographical area. For example, a backup from the US geographical area
+ * cannot be restored in an EU geographical area. This operation requires the key/backup
+ * permission.
+ * @summary Requests that a backup of the specified key be downloaded to the client.
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the key.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ backupKey(vaultBaseUrl: string, keyName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the key.
+ * @param callback The callback
+ */
+ backupKey(vaultBaseUrl: string, keyName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the key.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ backupKey(vaultBaseUrl: string, keyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ backupKey(vaultBaseUrl: string, keyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ vaultBaseUrl,
+ keyName,
+ options
+ },
+ backupKeyOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Imports a previously backed up key into Azure Key Vault, restoring the key, its key identifier,
+ * attributes and access control policies. The RESTORE operation may be used to import a previously
+ * backed up key. Individual versions of a key cannot be restored. The key is restored in its
+ * entirety with the same key name as it had when it was backed up. If the key name is not
+ * available in the target Key Vault, the RESTORE operation will be rejected. While the key name is
+ * retained during restore, the final key identifier will change if the key is restored to a
+ * different vault. Restore will restore all versions and preserve version identifiers. The RESTORE
+ * operation is subject to security constraints: The target Key Vault must be owned by the same
+ * Microsoft Azure Subscription as the source Key Vault The user must have RESTORE permission in
+ * the target Key Vault. This operation requires the keys/restore permission.
+ * @summary Restores a backed up key to a vault.
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyBundleBackup The backup blob associated with a key bundle.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ restoreKey(vaultBaseUrl: string, keyBundleBackup: Uint8Array, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyBundleBackup The backup blob associated with a key bundle.
+ * @param callback The callback
+ */
+ restoreKey(vaultBaseUrl: string, keyBundleBackup: Uint8Array, callback: msRest.ServiceCallback): void;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyBundleBackup The backup blob associated with a key bundle.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ restoreKey(vaultBaseUrl: string, keyBundleBackup: Uint8Array, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ restoreKey(vaultBaseUrl: string, keyBundleBackup: Uint8Array, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ vaultBaseUrl,
+ keyBundleBackup,
+ options
+ },
+ restoreKeyOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * The ENCRYPT operation encrypts an arbitrary sequence of bytes using an encryption key that is
+ * stored in Azure Key Vault. Note that the ENCRYPT operation only supports a single block of data,
+ * the size of which is dependent on the target key and the encryption algorithm to be used. The
+ * ENCRYPT operation is only strictly necessary for symmetric keys stored in Azure Key Vault since
+ * protection with an asymmetric key can be performed using public portion of the key. This
+ * operation is supported for asymmetric keys as a convenience for callers that have a
+ * key-reference but do not have access to the public key material. This operation requires the
+ * keys/encrypt permission.
+ * @summary Encrypts an arbitrary sequence of bytes using an encryption key that is stored in a key
+ * vault.
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the key.
+ * @param keyVersion The version of the key.
+ * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256',
+ * 'RSA1_5'
+ * @param value
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ encrypt(vaultBaseUrl: string, keyName: string, keyVersion: string, algorithm: Models.JsonWebKeyEncryptionAlgorithm, value: Uint8Array, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the key.
+ * @param keyVersion The version of the key.
+ * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256',
+ * 'RSA1_5'
+ * @param value
+ * @param callback The callback
+ */
+ encrypt(vaultBaseUrl: string, keyName: string, keyVersion: string, algorithm: Models.JsonWebKeyEncryptionAlgorithm, value: Uint8Array, callback: msRest.ServiceCallback): void;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the key.
+ * @param keyVersion The version of the key.
+ * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256',
+ * 'RSA1_5'
+ * @param value
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ encrypt(vaultBaseUrl: string, keyName: string, keyVersion: string, algorithm: Models.JsonWebKeyEncryptionAlgorithm, value: Uint8Array, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ encrypt(vaultBaseUrl: string, keyName: string, keyVersion: string, algorithm: Models.JsonWebKeyEncryptionAlgorithm, value: Uint8Array, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ vaultBaseUrl,
+ keyName,
+ keyVersion,
+ algorithm,
+ value,
+ options
+ },
+ encryptOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * The DECRYPT operation decrypts a well-formed block of ciphertext using the target encryption key
+ * and specified algorithm. This operation is the reverse of the ENCRYPT operation; only a single
+ * block of data may be decrypted, the size of this block is dependent on the target key and the
+ * algorithm to be used. The DECRYPT operation applies to asymmetric and symmetric keys stored in
+ * Azure Key Vault since it uses the private portion of the key. This operation requires the
+ * keys/decrypt permission.
+ * @summary Decrypts a single block of encrypted data.
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the key.
+ * @param keyVersion The version of the key.
+ * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256',
+ * 'RSA1_5'
+ * @param value
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ decrypt(vaultBaseUrl: string, keyName: string, keyVersion: string, algorithm: Models.JsonWebKeyEncryptionAlgorithm, value: Uint8Array, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the key.
+ * @param keyVersion The version of the key.
+ * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256',
+ * 'RSA1_5'
+ * @param value
+ * @param callback The callback
+ */
+ decrypt(vaultBaseUrl: string, keyName: string, keyVersion: string, algorithm: Models.JsonWebKeyEncryptionAlgorithm, value: Uint8Array, callback: msRest.ServiceCallback): void;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the key.
+ * @param keyVersion The version of the key.
+ * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256',
+ * 'RSA1_5'
+ * @param value
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ decrypt(vaultBaseUrl: string, keyName: string, keyVersion: string, algorithm: Models.JsonWebKeyEncryptionAlgorithm, value: Uint8Array, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ decrypt(vaultBaseUrl: string, keyName: string, keyVersion: string, algorithm: Models.JsonWebKeyEncryptionAlgorithm, value: Uint8Array, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ vaultBaseUrl,
+ keyName,
+ keyVersion,
+ algorithm,
+ value,
+ options
+ },
+ decryptOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * The SIGN operation is applicable to asymmetric and symmetric keys stored in Azure Key Vault
+ * since this operation uses the private portion of the key. This operation requires the keys/sign
+ * permission.
+ * @summary Creates a signature from a digest using the specified key.
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the key.
+ * @param keyVersion The version of the key.
+ * @param algorithm The signing/verification algorithm identifier. For more information on possible
+ * algorithm types, see JsonWebKeySignatureAlgorithm. Possible values include: 'PS256', 'PS384',
+ * 'PS512', 'RS256', 'RS384', 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', 'ES256K'
+ * @param value
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ sign(vaultBaseUrl: string, keyName: string, keyVersion: string, algorithm: Models.JsonWebKeySignatureAlgorithm, value: Uint8Array, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the key.
+ * @param keyVersion The version of the key.
+ * @param algorithm The signing/verification algorithm identifier. For more information on possible
+ * algorithm types, see JsonWebKeySignatureAlgorithm. Possible values include: 'PS256', 'PS384',
+ * 'PS512', 'RS256', 'RS384', 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', 'ES256K'
+ * @param value
+ * @param callback The callback
+ */
+ sign(vaultBaseUrl: string, keyName: string, keyVersion: string, algorithm: Models.JsonWebKeySignatureAlgorithm, value: Uint8Array, callback: msRest.ServiceCallback): void;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the key.
+ * @param keyVersion The version of the key.
+ * @param algorithm The signing/verification algorithm identifier. For more information on possible
+ * algorithm types, see JsonWebKeySignatureAlgorithm. Possible values include: 'PS256', 'PS384',
+ * 'PS512', 'RS256', 'RS384', 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', 'ES256K'
+ * @param value
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ sign(vaultBaseUrl: string, keyName: string, keyVersion: string, algorithm: Models.JsonWebKeySignatureAlgorithm, value: Uint8Array, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ sign(vaultBaseUrl: string, keyName: string, keyVersion: string, algorithm: Models.JsonWebKeySignatureAlgorithm, value: Uint8Array, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ vaultBaseUrl,
+ keyName,
+ keyVersion,
+ algorithm,
+ value,
+ options
+ },
+ signOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * The VERIFY operation is applicable to symmetric keys stored in Azure Key Vault. VERIFY is not
+ * strictly necessary for asymmetric keys stored in Azure Key Vault since signature verification
+ * can be performed using the public portion of the key but this operation is supported as a
+ * convenience for callers that only have a key-reference and not the public portion of the key.
+ * This operation requires the keys/verify permission.
+ * @summary Verifies a signature using a specified key.
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the key.
+ * @param keyVersion The version of the key.
+ * @param algorithm The signing/verification algorithm. For more information on possible algorithm
+ * types, see JsonWebKeySignatureAlgorithm. Possible values include: 'PS256', 'PS384', 'PS512',
+ * 'RS256', 'RS384', 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', 'ES256K'
+ * @param digest The digest used for signing.
+ * @param signature The signature to be verified.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ verify(vaultBaseUrl: string, keyName: string, keyVersion: string, algorithm: Models.JsonWebKeySignatureAlgorithm, digest: Uint8Array, signature: Uint8Array, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the key.
+ * @param keyVersion The version of the key.
+ * @param algorithm The signing/verification algorithm. For more information on possible algorithm
+ * types, see JsonWebKeySignatureAlgorithm. Possible values include: 'PS256', 'PS384', 'PS512',
+ * 'RS256', 'RS384', 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', 'ES256K'
+ * @param digest The digest used for signing.
+ * @param signature The signature to be verified.
+ * @param callback The callback
+ */
+ verify(vaultBaseUrl: string, keyName: string, keyVersion: string, algorithm: Models.JsonWebKeySignatureAlgorithm, digest: Uint8Array, signature: Uint8Array, callback: msRest.ServiceCallback): void;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the key.
+ * @param keyVersion The version of the key.
+ * @param algorithm The signing/verification algorithm. For more information on possible algorithm
+ * types, see JsonWebKeySignatureAlgorithm. Possible values include: 'PS256', 'PS384', 'PS512',
+ * 'RS256', 'RS384', 'RS512', 'RSNULL', 'ES256', 'ES384', 'ES512', 'ES256K'
+ * @param digest The digest used for signing.
+ * @param signature The signature to be verified.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ verify(vaultBaseUrl: string, keyName: string, keyVersion: string, algorithm: Models.JsonWebKeySignatureAlgorithm, digest: Uint8Array, signature: Uint8Array, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ verify(vaultBaseUrl: string, keyName: string, keyVersion: string, algorithm: Models.JsonWebKeySignatureAlgorithm, digest: Uint8Array, signature: Uint8Array, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ vaultBaseUrl,
+ keyName,
+ keyVersion,
+ algorithm,
+ digest,
+ signature,
+ options
+ },
+ verifyOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * The WRAP operation supports encryption of a symmetric key using a key encryption key that has
+ * previously been stored in an Azure Key Vault. The WRAP operation is only strictly necessary for
+ * symmetric keys stored in Azure Key Vault since protection with an asymmetric key can be
+ * performed using the public portion of the key. This operation is supported for asymmetric keys
+ * as a convenience for callers that have a key-reference but do not have access to the public key
+ * material. This operation requires the keys/wrapKey permission.
+ * @summary Wraps a symmetric key using a specified key.
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the key.
+ * @param keyVersion The version of the key.
+ * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256',
+ * 'RSA1_5'
+ * @param value
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ wrapKey(vaultBaseUrl: string, keyName: string, keyVersion: string, algorithm: Models.JsonWebKeyEncryptionAlgorithm, value: Uint8Array, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the key.
+ * @param keyVersion The version of the key.
+ * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256',
+ * 'RSA1_5'
+ * @param value
+ * @param callback The callback
+ */
+ wrapKey(vaultBaseUrl: string, keyName: string, keyVersion: string, algorithm: Models.JsonWebKeyEncryptionAlgorithm, value: Uint8Array, callback: msRest.ServiceCallback): void;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the key.
+ * @param keyVersion The version of the key.
+ * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256',
+ * 'RSA1_5'
+ * @param value
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ wrapKey(vaultBaseUrl: string, keyName: string, keyVersion: string, algorithm: Models.JsonWebKeyEncryptionAlgorithm, value: Uint8Array, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ wrapKey(vaultBaseUrl: string, keyName: string, keyVersion: string, algorithm: Models.JsonWebKeyEncryptionAlgorithm, value: Uint8Array, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ vaultBaseUrl,
+ keyName,
+ keyVersion,
+ algorithm,
+ value,
+ options
+ },
+ wrapKeyOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * The UNWRAP operation supports decryption of a symmetric key using the target key encryption key.
+ * This operation is the reverse of the WRAP operation. The UNWRAP operation applies to asymmetric
+ * and symmetric keys stored in Azure Key Vault since it uses the private portion of the key. This
+ * operation requires the keys/unwrapKey permission.
+ * @summary Unwraps a symmetric key using the specified key that was initially used for wrapping
+ * that key.
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the key.
+ * @param keyVersion The version of the key.
+ * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256',
+ * 'RSA1_5'
+ * @param value
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ unwrapKey(vaultBaseUrl: string, keyName: string, keyVersion: string, algorithm: Models.JsonWebKeyEncryptionAlgorithm, value: Uint8Array, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the key.
+ * @param keyVersion The version of the key.
+ * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256',
+ * 'RSA1_5'
+ * @param value
+ * @param callback The callback
+ */
+ unwrapKey(vaultBaseUrl: string, keyName: string, keyVersion: string, algorithm: Models.JsonWebKeyEncryptionAlgorithm, value: Uint8Array, callback: msRest.ServiceCallback): void;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the key.
+ * @param keyVersion The version of the key.
+ * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA-OAEP-256',
+ * 'RSA1_5'
+ * @param value
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ unwrapKey(vaultBaseUrl: string, keyName: string, keyVersion: string, algorithm: Models.JsonWebKeyEncryptionAlgorithm, value: Uint8Array, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ unwrapKey(vaultBaseUrl: string, keyName: string, keyVersion: string, algorithm: Models.JsonWebKeyEncryptionAlgorithm, value: Uint8Array, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ vaultBaseUrl,
+ keyName,
+ keyVersion,
+ algorithm,
+ value,
+ options
+ },
+ unwrapKeyOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Retrieves a list of the keys in the Key Vault as JSON Web Key structures that contain the public
+ * part of a deleted key. This operation includes deletion-specific information. The Get Deleted
+ * Keys operation is applicable for vaults enabled for soft-delete. While the operation can be
+ * invoked on any vault, it will return an error if invoked on a non soft-delete enabled vault.
+ * This operation requires the keys/list permission.
+ * @summary Lists the deleted keys in the specified vault.
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ getDeletedKeys(vaultBaseUrl: string, options?: Models.KeyVaultClientGetDeletedKeysOptionalParams): Promise;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param callback The callback
+ */
+ getDeletedKeys(vaultBaseUrl: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ getDeletedKeys(vaultBaseUrl: string, options: Models.KeyVaultClientGetDeletedKeysOptionalParams, callback: msRest.ServiceCallback): void;
+ getDeletedKeys(vaultBaseUrl: string, options?: Models.KeyVaultClientGetDeletedKeysOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ vaultBaseUrl,
+ options
+ },
+ getDeletedKeysOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * The Get Deleted Key operation is applicable for soft-delete enabled vaults. While the operation
+ * can be invoked on any vault, it will return an error if invoked on a non soft-delete enabled
+ * vault. This operation requires the keys/get permission.
+ * @summary Gets the public part of a deleted key.
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the key.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ getDeletedKey(vaultBaseUrl: string, keyName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the key.
+ * @param callback The callback
+ */
+ getDeletedKey(vaultBaseUrl: string, keyName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the key.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ getDeletedKey(vaultBaseUrl: string, keyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ getDeletedKey(vaultBaseUrl: string, keyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ vaultBaseUrl,
+ keyName,
+ options
+ },
+ getDeletedKeyOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * The Purge Deleted Key operation is applicable for soft-delete enabled vaults. While the
+ * operation can be invoked on any vault, it will return an error if invoked on a non soft-delete
+ * enabled vault. This operation requires the keys/purge permission.
+ * @summary Permanently deletes the specified key.
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the key
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ purgeDeletedKey(vaultBaseUrl: string, keyName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the key
+ * @param callback The callback
+ */
+ purgeDeletedKey(vaultBaseUrl: string, keyName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the key
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ purgeDeletedKey(vaultBaseUrl: string, keyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ purgeDeletedKey(vaultBaseUrl: string, keyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ vaultBaseUrl,
+ keyName,
+ options
+ },
+ purgeDeletedKeyOperationSpec,
+ callback);
+ }
+
+ /**
+ * The Recover Deleted Key operation is applicable for deleted keys in soft-delete enabled vaults.
+ * It recovers the deleted key back to its latest version under /keys. An attempt to recover an
+ * non-deleted key will return an error. Consider this the inverse of the delete operation on
+ * soft-delete enabled vaults. This operation requires the keys/recover permission.
+ * @summary Recovers the deleted key to its latest version.
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the deleted key.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ recoverDeletedKey(vaultBaseUrl: string, keyName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the deleted key.
+ * @param callback The callback
+ */
+ recoverDeletedKey(vaultBaseUrl: string, keyName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param keyName The name of the deleted key.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ recoverDeletedKey(vaultBaseUrl: string, keyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ recoverDeletedKey(vaultBaseUrl: string, keyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ vaultBaseUrl,
+ keyName,
+ options
+ },
+ recoverDeletedKeyOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * The SET operation adds a secret to the Azure Key Vault. If the named secret already exists,
+ * Azure Key Vault creates a new version of that secret. This operation requires the secrets/set
+ * permission.
+ * @summary Sets a secret in a specified key vault.
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param secretName The name of the secret.
+ * @param value The value of the secret.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ setSecret(vaultBaseUrl: string, secretName: string, value: string, options?: Models.KeyVaultClientSetSecretOptionalParams): Promise;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param secretName The name of the secret.
+ * @param value The value of the secret.
+ * @param callback The callback
+ */
+ setSecret(vaultBaseUrl: string, secretName: string, value: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param secretName The name of the secret.
+ * @param value The value of the secret.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ setSecret(vaultBaseUrl: string, secretName: string, value: string, options: Models.KeyVaultClientSetSecretOptionalParams, callback: msRest.ServiceCallback): void;
+ setSecret(vaultBaseUrl: string, secretName: string, value: string, options?: Models.KeyVaultClientSetSecretOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ vaultBaseUrl,
+ secretName,
+ value,
+ options
+ },
+ setSecretOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * The DELETE operation applies to any secret stored in Azure Key Vault. DELETE cannot be applied
+ * to an individual version of a secret. This operation requires the secrets/delete permission.
+ * @summary Deletes a secret from a specified key vault.
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param secretName The name of the secret.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ deleteSecret(vaultBaseUrl: string, secretName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param secretName The name of the secret.
+ * @param callback The callback
+ */
+ deleteSecret(vaultBaseUrl: string, secretName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param secretName The name of the secret.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ deleteSecret(vaultBaseUrl: string, secretName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ deleteSecret(vaultBaseUrl: string, secretName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ vaultBaseUrl,
+ secretName,
+ options
+ },
+ deleteSecretOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * The UPDATE operation changes specified attributes of an existing stored secret. Attributes that
+ * are not specified in the request are left unchanged. The value of a secret itself cannot be
+ * changed. This operation requires the secrets/set permission.
+ * @summary Updates the attributes associated with a specified secret in a given key vault.
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param secretName The name of the secret.
+ * @param secretVersion The version of the secret.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ updateSecret(vaultBaseUrl: string, secretName: string, secretVersion: string, options?: Models.KeyVaultClientUpdateSecretOptionalParams): Promise;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param secretName The name of the secret.
+ * @param secretVersion The version of the secret.
+ * @param callback The callback
+ */
+ updateSecret(vaultBaseUrl: string, secretName: string, secretVersion: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param secretName The name of the secret.
+ * @param secretVersion The version of the secret.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ updateSecret(vaultBaseUrl: string, secretName: string, secretVersion: string, options: Models.KeyVaultClientUpdateSecretOptionalParams, callback: msRest.ServiceCallback): void;
+ updateSecret(vaultBaseUrl: string, secretName: string, secretVersion: string, options?: Models.KeyVaultClientUpdateSecretOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ vaultBaseUrl,
+ secretName,
+ secretVersion,
+ options
+ },
+ updateSecretOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * The GET operation is applicable to any secret stored in Azure Key Vault. This operation requires
+ * the secrets/get permission.
+ * @summary Get a specified secret from a given key vault.
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param secretName The name of the secret.
+ * @param secretVersion The version of the secret.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ getSecret(vaultBaseUrl: string, secretName: string, secretVersion: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param secretName The name of the secret.
+ * @param secretVersion The version of the secret.
+ * @param callback The callback
+ */
+ getSecret(vaultBaseUrl: string, secretName: string, secretVersion: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param secretName The name of the secret.
+ * @param secretVersion The version of the secret.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ getSecret(vaultBaseUrl: string, secretName: string, secretVersion: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ getSecret(vaultBaseUrl: string, secretName: string, secretVersion: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ vaultBaseUrl,
+ secretName,
+ secretVersion,
+ options
+ },
+ getSecretOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * The Get Secrets operation is applicable to the entire vault. However, only the base secret
+ * identifier and its attributes are provided in the response. Individual secret versions are not
+ * listed in the response. This operation requires the secrets/list permission.
+ * @summary List secrets in a specified key vault.
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ getSecrets(vaultBaseUrl: string, options?: Models.KeyVaultClientGetSecretsOptionalParams): Promise;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param callback The callback
+ */
+ getSecrets(vaultBaseUrl: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ getSecrets(vaultBaseUrl: string, options: Models.KeyVaultClientGetSecretsOptionalParams, callback: msRest.ServiceCallback): void;
+ getSecrets(vaultBaseUrl: string, options?: Models.KeyVaultClientGetSecretsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ vaultBaseUrl,
+ options
+ },
+ getSecretsOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * The full secret identifier and attributes are provided in the response. No values are returned
+ * for the secrets. This operations requires the secrets/list permission.
+ * @summary List all versions of the specified secret.
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param secretName The name of the secret.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ getSecretVersions(vaultBaseUrl: string, secretName: string, options?: Models.KeyVaultClientGetSecretVersionsOptionalParams): Promise;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param secretName The name of the secret.
+ * @param callback The callback
+ */
+ getSecretVersions(vaultBaseUrl: string, secretName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param secretName The name of the secret.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ getSecretVersions(vaultBaseUrl: string, secretName: string, options: Models.KeyVaultClientGetSecretVersionsOptionalParams, callback: msRest.ServiceCallback): void;
+ getSecretVersions(vaultBaseUrl: string, secretName: string, options?: Models.KeyVaultClientGetSecretVersionsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ vaultBaseUrl,
+ secretName,
+ options
+ },
+ getSecretVersionsOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * The Get Deleted Secrets operation returns the secrets that have been deleted for a vault enabled
+ * for soft-delete. This operation requires the secrets/list permission.
+ * @summary Lists deleted secrets for the specified vault.
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ getDeletedSecrets(vaultBaseUrl: string, options?: Models.KeyVaultClientGetDeletedSecretsOptionalParams): Promise;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param callback The callback
+ */
+ getDeletedSecrets(vaultBaseUrl: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ getDeletedSecrets(vaultBaseUrl: string, options: Models.KeyVaultClientGetDeletedSecretsOptionalParams, callback: msRest.ServiceCallback): void;
+ getDeletedSecrets(vaultBaseUrl: string, options?: Models.KeyVaultClientGetDeletedSecretsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ vaultBaseUrl,
+ options
+ },
+ getDeletedSecretsOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * The Get Deleted Secret operation returns the specified deleted secret along with its attributes.
+ * This operation requires the secrets/get permission.
+ * @summary Gets the specified deleted secret.
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param secretName The name of the secret.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ getDeletedSecret(vaultBaseUrl: string, secretName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param secretName The name of the secret.
+ * @param callback The callback
+ */
+ getDeletedSecret(vaultBaseUrl: string, secretName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param secretName The name of the secret.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ getDeletedSecret(vaultBaseUrl: string, secretName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ getDeletedSecret(vaultBaseUrl: string, secretName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ vaultBaseUrl,
+ secretName,
+ options
+ },
+ getDeletedSecretOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * The purge deleted secret operation removes the secret permanently, without the possibility of
+ * recovery. This operation can only be enabled on a soft-delete enabled vault. This operation
+ * requires the secrets/purge permission.
+ * @summary Permanently deletes the specified secret.
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param secretName The name of the secret.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ purgeDeletedSecret(vaultBaseUrl: string, secretName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param secretName The name of the secret.
+ * @param callback The callback
+ */
+ purgeDeletedSecret(vaultBaseUrl: string, secretName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param secretName The name of the secret.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ purgeDeletedSecret(vaultBaseUrl: string, secretName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ purgeDeletedSecret(vaultBaseUrl: string, secretName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ vaultBaseUrl,
+ secretName,
+ options
+ },
+ purgeDeletedSecretOperationSpec,
+ callback);
+ }
+
+ /**
+ * Recovers the deleted secret in the specified vault. This operation can only be performed on a
+ * soft-delete enabled vault. This operation requires the secrets/recover permission.
+ * @summary Recovers the deleted secret to the latest version.
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param secretName The name of the deleted secret.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ recoverDeletedSecret(vaultBaseUrl: string, secretName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param secretName The name of the deleted secret.
+ * @param callback The callback
+ */
+ recoverDeletedSecret(vaultBaseUrl: string, secretName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param secretName The name of the deleted secret.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ recoverDeletedSecret(vaultBaseUrl: string, secretName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ recoverDeletedSecret(vaultBaseUrl: string, secretName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ vaultBaseUrl,
+ secretName,
+ options
+ },
+ recoverDeletedSecretOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Requests that a backup of the specified secret be downloaded to the client. All versions of the
+ * secret will be downloaded. This operation requires the secrets/backup permission.
+ * @summary Backs up the specified secret.
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param secretName The name of the secret.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ backupSecret(vaultBaseUrl: string, secretName: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param secretName The name of the secret.
+ * @param callback The callback
+ */
+ backupSecret(vaultBaseUrl: string, secretName: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param secretName The name of the secret.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ backupSecret(vaultBaseUrl: string, secretName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ backupSecret(vaultBaseUrl: string, secretName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ vaultBaseUrl,
+ secretName,
+ options
+ },
+ backupSecretOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * Restores a backed up secret, and all its versions, to a vault. This operation requires the
+ * secrets/restore permission.
+ * @summary Restores a backed up secret to a vault.
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param secretBundleBackup The backup blob associated with a secret bundle.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ restoreSecret(vaultBaseUrl: string, secretBundleBackup: Uint8Array, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param secretBundleBackup The backup blob associated with a secret bundle.
+ * @param callback The callback
+ */
+ restoreSecret(vaultBaseUrl: string, secretBundleBackup: Uint8Array, callback: msRest.ServiceCallback): void;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param secretBundleBackup The backup blob associated with a secret bundle.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ restoreSecret(vaultBaseUrl: string, secretBundleBackup: Uint8Array, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ restoreSecret(vaultBaseUrl: string, secretBundleBackup: Uint8Array, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ vaultBaseUrl,
+ secretBundleBackup,
+ options
+ },
+ restoreSecretOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * The GetCertificates operation returns the set of certificates resources in the specified key
+ * vault. This operation requires the certificates/list permission.
+ * @summary List certificates in a specified key vault
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ getCertificates(vaultBaseUrl: string, options?: Models.KeyVaultClientGetCertificatesOptionalParams): Promise;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param callback The callback
+ */
+ getCertificates(vaultBaseUrl: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ getCertificates(vaultBaseUrl: string, options: Models.KeyVaultClientGetCertificatesOptionalParams, callback: msRest.ServiceCallback): void;
+ getCertificates(vaultBaseUrl: string, options?: Models.KeyVaultClientGetCertificatesOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ vaultBaseUrl,
+ options
+ },
+ getCertificatesOperationSpec,
+ callback) as Promise